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
- NotificationContext.cs
- WindowsScroll.cs
- MenuBindingsEditor.cs
- ShaperBuffers.cs
- NameObjectCollectionBase.cs
- TypeExtensions.cs
- ContextQuery.cs
- RegexInterpreter.cs
- BitmapEffectGeneralTransform.cs
- MetroSerializationManager.cs
- SubMenuStyleCollection.cs
- SqlParameterCollection.cs
- FlowDocumentView.cs
- securitycriticaldataClass.cs
- GregorianCalendar.cs
- CodeParameterDeclarationExpression.cs
- ItemsPanelTemplate.cs
- Part.cs
- DesigntimeLicenseContext.cs
- CompressStream.cs
- documentation.cs
- NetDataContractSerializer.cs
- ExpressionBuilder.cs
- ScrollableControl.cs
- ValueUtilsSmi.cs
- DesignSurfaceManager.cs
- CFGGrammar.cs
- Site.cs
- _AcceptOverlappedAsyncResult.cs
- DataGridTemplateColumn.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Encoder.cs
- HtmlGenericControl.cs
- X509Certificate2.cs
- CommandField.cs
- DescendentsWalkerBase.cs
- ImmutableObjectAttribute.cs
- EntityDataSourceStatementEditorForm.cs
- GraphicsContainer.cs
- EntityContainerEmitter.cs
- ThemeDictionaryExtension.cs
- KnownBoxes.cs
- ToolstripProfessionalRenderer.cs
- LinkedResource.cs
- ExternalCalls.cs
- WebInvokeAttribute.cs
- dbdatarecord.cs
- PrePrepareMethodAttribute.cs
- DynamicDiscoveryDocument.cs
- ApplicationException.cs
- AggregateNode.cs
- BindingWorker.cs
- DbProviderFactory.cs
- TransformerConfigurationWizardBase.cs
- FormViewRow.cs
- EmptyTextWriter.cs
- ClrPerspective.cs
- StaticSiteMapProvider.cs
- BinaryObjectWriter.cs
- MailMessageEventArgs.cs
- FilteredReadOnlyMetadataCollection.cs
- MenuItem.cs
- SyndicationPerson.cs
- _NTAuthentication.cs
- ObjectAnimationUsingKeyFrames.cs
- SemaphoreSecurity.cs
- CommonDialog.cs
- SvcMapFileLoader.cs
- FieldBuilder.cs
- GridViewHeaderRowPresenter.cs
- MutexSecurity.cs
- ReferencedType.cs
- ListViewGroup.cs
- ToolStripSplitStackLayout.cs
- CorrelationQuery.cs
- URIFormatException.cs
- PersonalizationProviderCollection.cs
- InvalidAsynchronousStateException.cs
- RewritingValidator.cs
- LicenseContext.cs
- GenericEnumerator.cs
- UpdatePanelTrigger.cs
- GuidConverter.cs
- MeshGeometry3D.cs
- WebControlParameterProxy.cs
- DataListComponentEditor.cs
- DefaultHttpHandler.cs
- UiaCoreTypesApi.cs
- ToolStripRendererSwitcher.cs
- ErrorHandler.cs
- ProfilePropertySettings.cs
- basevalidator.cs
- Certificate.cs
- FileVersion.cs
- DrawingState.cs
- CriticalHandle.cs
- DifferencingCollection.cs
- FixUpCollection.cs
- SafeTimerHandle.cs
- IPAddressCollection.cs