Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebHttpSecurity.cs / 1305376 / WebHttpSecurity.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Runtime; using System.ServiceModel.Channels; using System.ComponentModel; public sealed class WebHttpSecurity { internal const WebHttpSecurityMode DefaultMode = WebHttpSecurityMode.None; WebHttpSecurityMode mode; HttpTransportSecurity transportSecurity; bool isModeSet; public WebHttpSecurity() { this.transportSecurity = new HttpTransportSecurity(); } public WebHttpSecurityMode Mode { get { return this.mode; } set { if (!WebHttpSecurityModeHelper.IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); } this.mode = value; this.isModeSet = true; } } internal bool IsModeSet { get { return this.isModeSet; } } public HttpTransportSecurity Transport { get { return this.transportSecurity; } set { this.transportSecurity = (value == null) ? new HttpTransportSecurity() : value; } } internal void DisableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.DisableTransportAuthentication(http); } internal void EnableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.ConfigureTransportAuthentication(http); } internal void EnableTransportSecurity(HttpsTransportBindingElement https) { this.transportSecurity.ConfigureTransportProtectionAndAuthentication(https); } internal bool InternalShouldSerialize() { return this.ShouldSerializeMode() || this.ShouldSerializeTransport(); } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeMode() { return this.Mode != DefaultMode; } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeTransport() { return this.Transport.InternalShouldSerialize(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewCellValidatingEventArgs.cs
- ClientFormsAuthenticationMembershipProvider.cs
- CultureInfo.cs
- RootBrowserWindow.cs
- UdpDiscoveryEndpointElement.cs
- Point3DValueSerializer.cs
- ColorAnimationUsingKeyFrames.cs
- Set.cs
- Endpoint.cs
- BuildResult.cs
- FlowPosition.cs
- CacheVirtualItemsEvent.cs
- SQLInt64.cs
- QuadraticBezierSegment.cs
- CachedFontFace.cs
- OverrideMode.cs
- BaseParser.cs
- RotateTransform3D.cs
- brushes.cs
- BasicViewGenerator.cs
- SQLInt16.cs
- InvalidAsynchronousStateException.cs
- EdmFunctions.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- TreeIterators.cs
- PopupRoot.cs
- DirectoryRootQuery.cs
- Rule.cs
- MessageSecurityProtocolFactory.cs
- TextServicesManager.cs
- FileDataSource.cs
- WinCategoryAttribute.cs
- URLString.cs
- NavigationPropertyEmitter.cs
- XPathDescendantIterator.cs
- ReadOnlyObservableCollection.cs
- TextContainerChangedEventArgs.cs
- PeerUnsafeNativeMethods.cs
- CheckPair.cs
- UniqueEventHelper.cs
- StartUpEventArgs.cs
- CompilerParameters.cs
- Reference.cs
- RenderData.cs
- DataSourceCacheDurationConverter.cs
- JapaneseLunisolarCalendar.cs
- CodeDomExtensionMethods.cs
- FramingDecoders.cs
- SystemInformation.cs
- FormsAuthentication.cs
- IdnMapping.cs
- Attributes.cs
- RowBinding.cs
- Utils.cs
- ComponentResourceKeyConverter.cs
- CommentGlyph.cs
- LayoutTableCell.cs
- QueueProcessor.cs
- ComAdminInterfaces.cs
- RoutedEventHandlerInfo.cs
- XmlSignificantWhitespace.cs
- InvariantComparer.cs
- Renderer.cs
- HGlobalSafeHandle.cs
- SoapSchemaImporter.cs
- LocalizableAttribute.cs
- NavigationProperty.cs
- DiscreteKeyFrames.cs
- RtfFormatStack.cs
- TextTreeRootTextBlock.cs
- Int64AnimationUsingKeyFrames.cs
- HtmlForm.cs
- XmlLanguage.cs
- Model3DGroup.cs
- path.cs
- ProvideValueServiceProvider.cs
- DeferredBinaryDeserializerExtension.cs
- OleCmdHelper.cs
- ItemDragEvent.cs
- SymDocumentType.cs
- ObjectStateEntryDbDataRecord.cs
- PropertyValueEditor.cs
- DataGridComponentEditor.cs
- PackagePartCollection.cs
- TypedRowHandler.cs
- VSDExceptions.cs
- ScriptReference.cs
- ConfigXmlCDataSection.cs
- XmlSchemaChoice.cs
- AudioSignalProblemOccurredEventArgs.cs
- GlyphShapingProperties.cs
- UserControl.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- WmlValidationSummaryAdapter.cs
- ExternalDataExchangeService.cs
- ConfigXmlAttribute.cs
- TextElementCollectionHelper.cs
- TextServicesManager.cs
- Msec.cs
- DataBindingHandlerAttribute.cs