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
- _CacheStreams.cs
- BamlLocalizabilityResolver.cs
- WebReferenceCollection.cs
- IERequestCache.cs
- WebBrowserProgressChangedEventHandler.cs
- DateTimeOffset.cs
- DesignTimeType.cs
- ThaiBuddhistCalendar.cs
- Menu.cs
- Int32Rect.cs
- WarningException.cs
- DebugInfo.cs
- ZipIOCentralDirectoryBlock.cs
- SafeCancelMibChangeNotify.cs
- HotCommands.cs
- DependsOnAttribute.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- TickBar.cs
- DateTimeOffsetAdapter.cs
- FlowDocumentScrollViewer.cs
- XPathNavigatorKeyComparer.cs
- SingleAnimationBase.cs
- EdgeProfileValidation.cs
- IncrementalHitTester.cs
- AmbientValueAttribute.cs
- QueryGenerator.cs
- MimeTypeMapper.cs
- DataGridItem.cs
- PrintPreviewDialog.cs
- TreeNodeStyle.cs
- ErrorWrapper.cs
- XmlSchemaExporter.cs
- ProtocolsConfiguration.cs
- CodeMemberEvent.cs
- FastPropertyAccessor.cs
- ExpressionParser.cs
- PaperSize.cs
- TextSpan.cs
- TrackBar.cs
- DefaultPrintController.cs
- DataServiceBuildProvider.cs
- ICspAsymmetricAlgorithm.cs
- DeferredElementTreeState.cs
- DoWorkEventArgs.cs
- AbsoluteQuery.cs
- LayoutInformation.cs
- MailBnfHelper.cs
- InternalConfigRoot.cs
- Model3DGroup.cs
- ListChangedEventArgs.cs
- ViewGenResults.cs
- ScriptServiceAttribute.cs
- DocumentViewerBaseAutomationPeer.cs
- EventBuilder.cs
- ReflectionPermission.cs
- XmlILConstructAnalyzer.cs
- _FtpDataStream.cs
- ListViewSelectEventArgs.cs
- ExclusiveNamedPipeTransportManager.cs
- UnmanagedMemoryStreamWrapper.cs
- BufferModesCollection.cs
- SpotLight.cs
- DeviceContext.cs
- wmiprovider.cs
- HttpFileCollection.cs
- BoundPropertyEntry.cs
- BamlRecords.cs
- ACE.cs
- EmbeddedMailObject.cs
- SmiEventSink_DeferedProcessing.cs
- ConfigXmlSignificantWhitespace.cs
- PatternMatcher.cs
- EndOfStreamException.cs
- PropertyTabChangedEvent.cs
- HexParser.cs
- ProfileProvider.cs
- RegexWorker.cs
- ContravarianceAdapter.cs
- ScrollViewer.cs
- DataControlPagerLinkButton.cs
- ImageCodecInfoPrivate.cs
- WebBrowserBase.cs
- StorageEntityContainerMapping.cs
- CollectionTraceRecord.cs
- ObjectQuery_EntitySqlExtensions.cs
- Point3D.cs
- DialogWindow.cs
- SchemaEntity.cs
- RouteParameter.cs
- RijndaelManaged.cs
- DesignerObject.cs
- TriggerAction.cs
- StrokeFIndices.cs
- WebPartVerbsEventArgs.cs
- BinaryFormatter.cs
- ImpersonateTokenRef.cs
- listitem.cs
- TextTreeDeleteContentUndoUnit.cs
- DataGrid.cs
- ExpressionConverter.cs