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
- KeyInfo.cs
- ListItemsCollectionEditor.cs
- LoginUtil.cs
- StoryFragments.cs
- TreeNodeCollectionEditorDialog.cs
- SafeCryptoHandles.cs
- Simplifier.cs
- WinFormsSpinner.cs
- CellQuery.cs
- TextDecorationLocationValidation.cs
- ClientCredentialsSecurityTokenManager.cs
- UpdateManifestForBrowserApplication.cs
- DataGridRow.cs
- TraceSection.cs
- XPathAncestorQuery.cs
- ProtocolsConfigurationHandler.cs
- WebPartCollection.cs
- StringArrayConverter.cs
- MenuTracker.cs
- RangeExpression.cs
- XmlSchemaSimpleContentRestriction.cs
- XpsFontSerializationService.cs
- ApplicationCommands.cs
- SourceInterpreter.cs
- CodeArrayCreateExpression.cs
- ImageConverter.cs
- TextTreeText.cs
- GridEntryCollection.cs
- APCustomTypeDescriptor.cs
- EmptyElement.cs
- TcpStreams.cs
- UpdateException.cs
- EntityObject.cs
- SpeechUI.cs
- ArcSegment.cs
- MenuItem.cs
- XmlReader.cs
- PreviewPageInfo.cs
- ServiceDocument.cs
- EmptyEnumerator.cs
- EtwTrackingBehaviorElement.cs
- InheritanceContextChangedEventManager.cs
- EncryptedData.cs
- XNameTypeConverter.cs
- ToolStripStatusLabel.cs
- TableRow.cs
- smtppermission.cs
- HeaderedItemsControl.cs
- DesigntimeLicenseContextSerializer.cs
- ChangeTracker.cs
- PersonalizationProviderCollection.cs
- MatrixTransform.cs
- ProfileInfo.cs
- SymmetricKeyWrap.cs
- WebAdminConfigurationHelper.cs
- safesecurityhelperavalon.cs
- SystemInformation.cs
- DataGridRow.cs
- TreeViewHitTestInfo.cs
- GradientBrush.cs
- Delegate.cs
- Normalization.cs
- LingerOption.cs
- WorkflowMessageEventHandler.cs
- NumericUpDownAccelerationCollection.cs
- CopyOnWriteList.cs
- XamlVector3DCollectionSerializer.cs
- RelatedCurrencyManager.cs
- MouseBinding.cs
- ZipPackage.cs
- Stackframe.cs
- StylusPointDescription.cs
- HyperLinkColumn.cs
- PassportPrincipal.cs
- WindowsRichEdit.cs
- GridViewColumnHeader.cs
- CommonProperties.cs
- TrustManager.cs
- UnicastIPAddressInformationCollection.cs
- IisTraceListener.cs
- GuidelineCollection.cs
- XMLSyntaxException.cs
- PointCollection.cs
- CodeAttachEventStatement.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SeverityFilter.cs
- TextContainerHelper.cs
- MemoryFailPoint.cs
- wgx_commands.cs
- DateTimeStorage.cs
- Path.cs
- DbProviderFactories.cs
- GatewayIPAddressInformationCollection.cs
- ByteRangeDownloader.cs
- EntityContainerEmitter.cs
- SqlNodeAnnotation.cs
- ToolStripItemRenderEventArgs.cs
- EventMap.cs
- SelectionBorderGlyph.cs
- TreeWalker.cs