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
- IndexedGlyphRun.cs
- Localizer.cs
- AxHostDesigner.cs
- ExternalCalls.cs
- DetailsViewDeleteEventArgs.cs
- WebPartsPersonalization.cs
- TextStore.cs
- FormView.cs
- NamespaceEmitter.cs
- ClientConvert.cs
- DbQueryCommandTree.cs
- ClientUrlResolverWrapper.cs
- EntityDataSourceWizardForm.cs
- HttpCacheParams.cs
- CultureInfoConverter.cs
- SymLanguageVendor.cs
- NativeMethods.cs
- WebServiceHostFactory.cs
- ComponentEvent.cs
- HttpCapabilitiesSectionHandler.cs
- AppDomainGrammarProxy.cs
- ObjectDataSourceSelectingEventArgs.cs
- SafeFileMappingHandle.cs
- ADMembershipUser.cs
- MasterPageParser.cs
- TemplatePagerField.cs
- PropertyIDSet.cs
- BroadcastEventHelper.cs
- Italic.cs
- ToolStripTextBox.cs
- SafeHandles.cs
- PowerModeChangedEventArgs.cs
- SynchronizationScope.cs
- LocalTransaction.cs
- SiteMapDataSourceView.cs
- TypeInitializationException.cs
- SrgsElementFactoryCompiler.cs
- UrlAuthFailedErrorFormatter.cs
- Model3D.cs
- AdornerPresentationContext.cs
- Rotation3DAnimation.cs
- SmtpReplyReader.cs
- PenContext.cs
- CodeGroup.cs
- Socket.cs
- ISAPIRuntime.cs
- DataStreamFromComStream.cs
- listitem.cs
- CompositeClientFormatter.cs
- ButtonAutomationPeer.cs
- XslCompiledTransform.cs
- XmlSchemaObject.cs
- Pair.cs
- QilIterator.cs
- GridViewPageEventArgs.cs
- CLRBindingWorker.cs
- IHttpResponseInternal.cs
- SingleSelectRootGridEntry.cs
- URLIdentityPermission.cs
- Window.cs
- AsymmetricKeyExchangeDeformatter.cs
- XdrBuilder.cs
- CodeTryCatchFinallyStatement.cs
- Point3DCollectionValueSerializer.cs
- BindableTemplateBuilder.cs
- WindowsFormsLinkLabel.cs
- TransformGroup.cs
- Stroke2.cs
- ParseChildrenAsPropertiesAttribute.cs
- OdbcUtils.cs
- ObjectManager.cs
- SendSecurityHeader.cs
- PartManifestEntry.cs
- TypeResolvingOptionsAttribute.cs
- SurrogateSelector.cs
- BordersPage.cs
- VirtualPath.cs
- ConfigXmlComment.cs
- Itemizer.cs
- DataServices.cs
- ZipIOExtraField.cs
- EntityProviderServices.cs
- GridSplitterAutomationPeer.cs
- RadioButton.cs
- DataGridItemEventArgs.cs
- WindowsTitleBar.cs
- SQLInt32.cs
- TriggerCollection.cs
- Number.cs
- TextSelectionProcessor.cs
- ConcurrentBag.cs
- LinearGradientBrush.cs
- DataGridViewCellValidatingEventArgs.cs
- TemplateBaseAction.cs
- LocatorBase.cs
- GenerateHelper.cs
- UpdatePanel.cs
- ExpressionVisitor.cs
- WorkflowValidationFailedException.cs
- sqlpipe.cs