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
- EventPropertyMap.cs
- MethodToken.cs
- ExtensionElementCollection.cs
- DesignerOptionService.cs
- Logging.cs
- FuncTypeConverter.cs
- FixUpCollection.cs
- AssemblyBuilder.cs
- EventData.cs
- FontInfo.cs
- WebPartDeleteVerb.cs
- Pair.cs
- Point.cs
- DataGridRowHeaderAutomationPeer.cs
- XmlSchemaException.cs
- DefaultWorkflowTransactionService.cs
- KnownColorTable.cs
- CompositeControl.cs
- RedirectionProxy.cs
- AmbientLight.cs
- Contracts.cs
- DesignerView.xaml.cs
- IconConverter.cs
- ListViewItemSelectionChangedEvent.cs
- SiteMap.cs
- SubclassTypeValidator.cs
- CompleteWizardStep.cs
- DependencyPropertyDescriptor.cs
- AnnotationComponentManager.cs
- DataGrid.cs
- GlobalizationSection.cs
- CompilationRelaxations.cs
- RadioButtonPopupAdapter.cs
- UpdatableGenericsFeature.cs
- ContourSegment.cs
- XhtmlBasicObjectListAdapter.cs
- ListControl.cs
- ScriptManagerProxy.cs
- PropertyValueUIItem.cs
- DetailsViewCommandEventArgs.cs
- WebPartUtil.cs
- UserInitiatedNavigationPermission.cs
- ScrollChrome.cs
- HelpInfo.cs
- ErrorProvider.cs
- RefExpr.cs
- ConfigurationManagerInternalFactory.cs
- DataGridViewCellValidatingEventArgs.cs
- DataGridTextBoxColumn.cs
- TextRunTypographyProperties.cs
- StringConverter.cs
- DBCommand.cs
- DrawItemEvent.cs
- DataGridViewCellPaintingEventArgs.cs
- Descriptor.cs
- CapabilitiesUse.cs
- ProfilePropertySettingsCollection.cs
- TrackingStringDictionary.cs
- WebPartRestoreVerb.cs
- SuppressMergeCheckAttribute.cs
- DynamicMethod.cs
- InternalControlCollection.cs
- SymmetricKeyWrap.cs
- DataGridRelationshipRow.cs
- TypeGeneratedEventArgs.cs
- DynamicMethod.cs
- DataObjectSettingDataEventArgs.cs
- EventsTab.cs
- WindowsScroll.cs
- SqlDataSourceCommandEventArgs.cs
- GetMemberBinder.cs
- MsmqMessageProperty.cs
- Application.cs
- ChunkedMemoryStream.cs
- WebPartMenuStyle.cs
- RegularExpressionValidator.cs
- ControlsConfig.cs
- AuthorizationSection.cs
- GrammarBuilder.cs
- DateTimeConverter2.cs
- ConnectionPoolManager.cs
- FaultDescription.cs
- FileChangesMonitor.cs
- InkPresenter.cs
- ActivityStatusChangeEventArgs.cs
- TypedReference.cs
- PackagePart.cs
- UxThemeWrapper.cs
- ConfigXmlComment.cs
- DataGridViewRowsAddedEventArgs.cs
- UnmanagedBitmapWrapper.cs
- WebPartsPersonalizationAuthorization.cs
- securitycriticaldataformultiplegetandset.cs
- SoapElementAttribute.cs
- IEnumerable.cs
- DictionaryBase.cs
- ToolStripPanelDesigner.cs
- EmptyEnumerator.cs
- APCustomTypeDescriptor.cs
- XmlSchemaProviderAttribute.cs