Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Web / WebOperationContext.cs / 1 / WebOperationContext.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- #pragma warning disable 1634, 1691 namespace System.ServiceModel.Web { using System; using System.Globalization; using System.Diagnostics.CodeAnalysis; using System.ServiceModel; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.Net; using System.Collections.ObjectModel; using System.Collections.Specialized; public class WebOperationContext : IExtension{ OperationContext operationContext; public WebOperationContext(OperationContext operationContext) { if (operationContext == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("operationContext"); } this.operationContext = operationContext; #pragma warning disable 56506 // [....], operationContext.Extensions is never null if (operationContext.Extensions.Find () == null) { operationContext.Extensions.Add(this); } #pragma warning enable 56506 } public static WebOperationContext Current { get { if (OperationContext.Current == null) { return null; } WebOperationContext existing = OperationContext.Current.Extensions.Find (); if (existing != null) { return existing; } return new WebOperationContext(OperationContext.Current); } } public IncomingWebRequestContext IncomingRequest { get { return new IncomingWebRequestContext(this.operationContext); } } public IncomingWebResponseContext IncomingResponse { get { return new IncomingWebResponseContext(this.operationContext); } } public OutgoingWebRequestContext OutgoingRequest { get { return new OutgoingWebRequestContext(this.operationContext); } } public OutgoingWebResponseContext OutgoingResponse { get { return new OutgoingWebResponseContext(this.operationContext); } } public void Attach(OperationContext owner) { } public void Detach(OperationContext owner) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NativeMethods.cs
- MembershipUser.cs
- DependencyObject.cs
- ObjectListGeneralPage.cs
- SqlTriggerContext.cs
- Timeline.cs
- ToolStripControlHost.cs
- CornerRadius.cs
- ServicePointManagerElement.cs
- _UriTypeConverter.cs
- MappingModelBuildProvider.cs
- _UriTypeConverter.cs
- CancelEventArgs.cs
- PathData.cs
- DistributedTransactionPermission.cs
- BaseServiceProvider.cs
- DataGridRowClipboardEventArgs.cs
- TextElementCollection.cs
- DropTarget.cs
- PermissionRequestEvidence.cs
- AddInProcess.cs
- DataGridViewComboBoxCell.cs
- SupportingTokenBindingElement.cs
- DrawingState.cs
- OpacityConverter.cs
- HtmlValidatorAdapter.cs
- ObjectDataProvider.cs
- ExtendedProtectionPolicy.cs
- DataListGeneralPage.cs
- StrokeDescriptor.cs
- ObjectQuery.cs
- XmlNodeList.cs
- Message.cs
- UnsafeNativeMethodsTablet.cs
- StylusPlugin.cs
- WindowsFormsHost.cs
- BooleanStorage.cs
- QilTypeChecker.cs
- BoundPropertyEntry.cs
- MetadataArtifactLoaderFile.cs
- SignerInfo.cs
- QualifiedCellIdBoolean.cs
- WebReferencesBuildProvider.cs
- XmlDeclaration.cs
- FirstQueryOperator.cs
- SafeRightsManagementHandle.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- GridEntryCollection.cs
- EventSourceCreationData.cs
- DrawingContextWalker.cs
- IArgumentProvider.cs
- TypeConverterMarkupExtension.cs
- LayoutTable.cs
- XmlToDatasetMap.cs
- XmlParser.cs
- HorizontalAlignConverter.cs
- ConstraintCollection.cs
- ParameterCollection.cs
- DependencyPropertyHelper.cs
- PersonalizationProviderHelper.cs
- AssemblyUtil.cs
- MsmqInputSessionChannel.cs
- StringStorage.cs
- BrowserDefinition.cs
- PointCollection.cs
- ApplicationContext.cs
- RectangleConverter.cs
- RadioButtonAutomationPeer.cs
- XpsInterleavingPolicy.cs
- DataGridComboBoxColumn.cs
- NetTcpBindingElement.cs
- ConsoleKeyInfo.cs
- isolationinterop.cs
- WSTrust.cs
- NonParentingControl.cs
- StatusBarPanelClickEvent.cs
- MethodCallConverter.cs
- CheckBoxBaseAdapter.cs
- LinqDataSourceInsertEventArgs.cs
- recordstatefactory.cs
- Attributes.cs
- ThaiBuddhistCalendar.cs
- HttpFileCollection.cs
- relpropertyhelper.cs
- TdsEnums.cs
- DynamicMetaObject.cs
- EntityDataSourceWizardForm.cs
- SynchronousChannelMergeEnumerator.cs
- ColumnTypeConverter.cs
- VariantWrapper.cs
- SecureUICommand.cs
- SqlCommand.cs
- ListViewInsertionMark.cs
- SimpleType.cs
- NotFiniteNumberException.cs
- TransformPattern.cs
- XPathParser.cs
- BindableAttribute.cs
- TextRunCacheImp.cs
- OracleCommand.cs