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
- XmlAnyAttributeAttribute.cs
- SemanticTag.cs
- CharacterMetrics.cs
- CommonRemoteMemoryBlock.cs
- TrackBarRenderer.cs
- FileDialog_Vista_Interop.cs
- DiagnosticSection.cs
- TypeSystem.cs
- DataControlFieldHeaderCell.cs
- RemoveStoryboard.cs
- TemplateField.cs
- CopyAttributesAction.cs
- TransformBlockRequest.cs
- Command.cs
- DisplayInformation.cs
- SizeValueSerializer.cs
- ApplicationGesture.cs
- FileUtil.cs
- ScriptRef.cs
- ProfileParameter.cs
- FontWeightConverter.cs
- IArgumentProvider.cs
- SafeCertificateStore.cs
- PrimitiveCodeDomSerializer.cs
- Bitmap.cs
- MutexSecurity.cs
- HttpModuleActionCollection.cs
- ProtocolsSection.cs
- DataGridDetailsPresenter.cs
- GrammarBuilderRuleRef.cs
- SHA256Managed.cs
- _ConnectOverlappedAsyncResult.cs
- DataPagerFieldCollection.cs
- DataFormat.cs
- StylusPlugin.cs
- PresentationSource.cs
- ModelService.cs
- DataGridViewImageColumn.cs
- DispatcherProcessingDisabled.cs
- PropertyItemInternal.cs
- HexParser.cs
- SubstitutionResponseElement.cs
- WebResponse.cs
- EntityProviderFactory.cs
- FaultDesigner.cs
- HostingEnvironment.cs
- DynamicILGenerator.cs
- ScriptIgnoreAttribute.cs
- FixedTextBuilder.cs
- Animatable.cs
- FixedPageAutomationPeer.cs
- SimpleTableProvider.cs
- FolderNameEditor.cs
- DropAnimation.xaml.cs
- Wrapper.cs
- DocumentReference.cs
- ComboBoxRenderer.cs
- SEHException.cs
- DecoderFallbackWithFailureFlag.cs
- RemoteArgument.cs
- BuildManager.cs
- AnimatedTypeHelpers.cs
- SQLDouble.cs
- RemotingHelper.cs
- PathFigure.cs
- Pkcs7Signer.cs
- DoubleLinkListEnumerator.cs
- OleServicesContext.cs
- LayoutEditorPart.cs
- WindowsListBox.cs
- ProcessModule.cs
- PolicyChain.cs
- SqlCommand.cs
- ListControlConvertEventArgs.cs
- ListDictionary.cs
- SharedRuntimeState.cs
- LZCodec.cs
- ClassHandlersStore.cs
- WebScriptMetadataMessage.cs
- NodeInfo.cs
- RepeaterCommandEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- EditorPartCollection.cs
- WindowsSolidBrush.cs
- ClientScriptManagerWrapper.cs
- TypeNameParser.cs
- XmlLanguage.cs
- RoutedEventValueSerializer.cs
- LinqDataSourceStatusEventArgs.cs
- HtmlObjectListAdapter.cs
- QilFactory.cs
- WaitForChangedResult.cs
- EditorPartChrome.cs
- String.cs
- SocketElement.cs
- FindSimilarActivitiesVerb.cs
- KoreanCalendar.cs
- MultiSelectRootGridEntry.cs
- FormsAuthenticationUser.cs
- MessageAction.cs