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
- CompressEmulationStream.cs
- ImageSourceValueSerializer.cs
- GraphicsContainer.cs
- Rectangle.cs
- CommandCollectionEditor.cs
- ViewPort3D.cs
- DecoderNLS.cs
- ImageConverter.cs
- TextRangeSerialization.cs
- ModuleBuilderData.cs
- MaterialCollection.cs
- MarshalDirectiveException.cs
- Int16Converter.cs
- AddInToken.cs
- TextReader.cs
- CodeNamespaceImport.cs
- WebPartMenu.cs
- Bitmap.cs
- UiaCoreApi.cs
- NotifyCollectionChangedEventArgs.cs
- EmptyControlCollection.cs
- ErrorStyle.cs
- HttpModuleCollection.cs
- ColumnCollection.cs
- GC.cs
- FontSourceCollection.cs
- InvalidateEvent.cs
- SessionPageStateSection.cs
- ToolBar.cs
- FontFamily.cs
- ContentElement.cs
- XmlNode.cs
- EventToken.cs
- CqlParser.cs
- EncoderExceptionFallback.cs
- _TimerThread.cs
- AnimatedTypeHelpers.cs
- DispatchChannelSink.cs
- TableLayout.cs
- MethodSet.cs
- ChangeDirector.cs
- SerializerWriterEventHandlers.cs
- PackageRelationshipSelector.cs
- Tablet.cs
- DataServiceProviderMethods.cs
- Int64KeyFrameCollection.cs
- XmlSequenceWriter.cs
- TextBlockAutomationPeer.cs
- LogEntryHeaderDeserializer.cs
- PropertyEmitterBase.cs
- EmptyQuery.cs
- RMEnrollmentPage1.cs
- RandomDelayQueuedSendsAsyncResult.cs
- ToolStripPanelRenderEventArgs.cs
- PlainXmlWriter.cs
- Win32PrintDialog.cs
- SecurityPolicyVersion.cs
- PeerToPeerException.cs
- RequiredFieldValidator.cs
- LinkDescriptor.cs
- PathHelper.cs
- InternalControlCollection.cs
- RangeValueProviderWrapper.cs
- EnvironmentPermission.cs
- LogLogRecordEnumerator.cs
- NoClickablePointException.cs
- SettingsProperty.cs
- LockCookie.cs
- SignedXml.cs
- FixedSOMPageConstructor.cs
- RepeatBehavior.cs
- BamlStream.cs
- InternalBufferOverflowException.cs
- ProcessHostConfigUtils.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- InvokePattern.cs
- ViewGenResults.cs
- GiveFeedbackEvent.cs
- FontStretchConverter.cs
- AtomEntry.cs
- initElementDictionary.cs
- StringFreezingAttribute.cs
- EventLogPermissionEntryCollection.cs
- UnsafeNativeMethods.cs
- PageCache.cs
- SymbolMethod.cs
- TypeSystem.cs
- Visitor.cs
- EventManager.cs
- Facet.cs
- OperationAbortedException.cs
- XmlDictionaryString.cs
- InvalidPrinterException.cs
- PageHandlerFactory.cs
- InitializationEventAttribute.cs
- GreenMethods.cs
- FlowLayout.cs
- SmiMetaData.cs
- MenuItem.cs
- LockedHandleGlyph.cs