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
- TextParagraphProperties.cs
- MultiSelectRootGridEntry.cs
- HttpModulesSection.cs
- AlternationConverter.cs
- ExtenderProvidedPropertyAttribute.cs
- StructuredTypeEmitter.cs
- WhitespaceSignificantCollectionAttribute.cs
- SplineQuaternionKeyFrame.cs
- TrackBarRenderer.cs
- SmtpFailedRecipientException.cs
- ClientRolePrincipal.cs
- CompilerInfo.cs
- Journal.cs
- SchemaMerger.cs
- EmptyEnumerable.cs
- regiisutil.cs
- ValueSerializerAttribute.cs
- SettingsPropertyNotFoundException.cs
- PasswordRecoveryDesigner.cs
- PointHitTestParameters.cs
- SiteMapHierarchicalDataSourceView.cs
- SystemDiagnosticsSection.cs
- InfoCardTrace.cs
- CompilerInfo.cs
- Material.cs
- EditingCommands.cs
- CompressStream.cs
- EntitySetBaseCollection.cs
- TypeResolvingOptionsAttribute.cs
- CorrelationManager.cs
- ControlBindingsCollection.cs
- ProxyWebPartManager.cs
- HotCommands.cs
- XmlAtomicValue.cs
- SmiContextFactory.cs
- QualificationDataItem.cs
- BrowserCapabilitiesFactoryBase.cs
- CodeSubDirectory.cs
- MdbDataFileEditor.cs
- SqlCommandBuilder.cs
- NullableIntAverageAggregationOperator.cs
- AdjustableArrowCap.cs
- IItemProperties.cs
- SingleKeyFrameCollection.cs
- CodeIterationStatement.cs
- ModuleBuilderData.cs
- CapabilitiesUse.cs
- Compress.cs
- ZoomingMessageFilter.cs
- Int64AnimationUsingKeyFrames.cs
- BooleanFunctions.cs
- Matrix3DConverter.cs
- ProxyGenerator.cs
- GeneratedContractType.cs
- DesignerDataTable.cs
- FontEmbeddingManager.cs
- TimelineGroup.cs
- DocumentReferenceCollection.cs
- BindingContext.cs
- MissingFieldException.cs
- Cast.cs
- SimpleWorkerRequest.cs
- XmlAnyElementAttributes.cs
- precedingquery.cs
- Compilation.cs
- AttributeQuery.cs
- X509Certificate.cs
- NotImplementedException.cs
- ModuleBuilderData.cs
- RegexParser.cs
- mediaeventshelper.cs
- AliasExpr.cs
- ConfigXmlAttribute.cs
- FileChangesMonitor.cs
- PriorityQueue.cs
- ObjectFullSpanRewriter.cs
- XPathEmptyIterator.cs
- WebPartCatalogAddVerb.cs
- PrinterResolution.cs
- EncryptedKeyIdentifierClause.cs
- SiteMap.cs
- HyperLinkColumn.cs
- OdbcInfoMessageEvent.cs
- XmlSchemaSequence.cs
- ItemCheckEvent.cs
- ThreadStateException.cs
- Compilation.cs
- WinEventHandler.cs
- WindowsPrincipal.cs
- UpWmlPageAdapter.cs
- DependencySource.cs
- WhitespaceRuleReader.cs
- ITreeGenerator.cs
- DoubleAnimationClockResource.cs
- TargetPerspective.cs
- TextRenderer.cs
- Vertex.cs
- XamlUtilities.cs
- Rect3DConverter.cs
- SafeFileMappingHandle.cs