Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Configuration / WebHttpSecurityElement.cs / 1 / WebHttpSecurityElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel; public sealed partial class WebHttpSecurityElement : ConfigurationElement { ConfigurationPropertyCollection properties; [ConfigurationProperty(ConfigurationStrings.Mode, DefaultValue = WebHttpSecurity.DefaultMode)] [InternalEnumValidator(typeof(WebHttpSecurityModeHelper))] public WebHttpSecurityMode Mode { get { return (WebHttpSecurityMode) base[ConfigurationStrings.Mode]; } set { base[ConfigurationStrings.Mode] = value; } } [ConfigurationProperty(ConfigurationStrings.Transport)] public HttpTransportSecurityElement Transport { get { return (HttpTransportSecurityElement) base[ConfigurationStrings.Transport]; } } protected override ConfigurationPropertyCollection Properties { get { if (this.properties == null) { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); properties.Add(new ConfigurationProperty("mode", typeof(WebHttpSecurityMode), System.ServiceModel.WebHttpSecurityMode.None, null, new InternalEnumValidator(typeof(WebHttpSecurityModeHelper)), System.Configuration.ConfigurationPropertyOptions.None)); properties.Add(new ConfigurationProperty("transport", typeof(HttpTransportSecurityElement), null, null, null, System.Configuration.ConfigurationPropertyOptions.None)); this.properties = properties; } return this.properties; } } internal void ApplyConfiguration(WebHttpSecurity security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } security.Mode = this.Mode; this.Transport.ApplyConfiguration(security.Transport); } internal void InitializeFrom(WebHttpSecurity security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } this.Mode = security.Mode; this.InitializeTransportSecurity(security.Transport); } void ApplyConfiguration(HttpTransportSecurity security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } security.ClientCredentialType = this.Transport.ClientCredentialType; security.ProxyCredentialType = this.Transport.ProxyCredentialType; security.Realm = this.Transport.Realm; } void InitializeTransportSecurity(HttpTransportSecurity security) { if (security == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); } this.Transport.ClientCredentialType = security.ClientCredentialType; this.Transport.ProxyCredentialType = security.ProxyCredentialType; this.Transport.Realm = security.Realm; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LocalizableResourceBuilder.cs
- QilStrConcatenator.cs
- PropertyRecord.cs
- ExpressionHelper.cs
- EditCommandColumn.cs
- StrongNameKeyPair.cs
- CollectionEditor.cs
- ErrorView.xaml.cs
- SharedStatics.cs
- WebPart.cs
- ReflectionTypeLoadException.cs
- BamlRecords.cs
- ToolStripOverflow.cs
- ErrorProvider.cs
- FixedTextPointer.cs
- PointLightBase.cs
- NumberFunctions.cs
- SpecularMaterial.cs
- XmlTextReaderImpl.cs
- HttpSocketManager.cs
- NameValueConfigurationCollection.cs
- ThreadSafeList.cs
- AttributeSetAction.cs
- WebPartMenu.cs
- OracleException.cs
- DataGridComponentEditor.cs
- EpmAttributeNameBuilder.cs
- CodeDomConfigurationHandler.cs
- ColorBuilder.cs
- DiscreteKeyFrames.cs
- GeometryValueSerializer.cs
- SoapInteropTypes.cs
- VectorCollectionValueSerializer.cs
- EventSetter.cs
- Misc.cs
- PerformanceCounterLib.cs
- TreeNodeStyle.cs
- ComNativeDescriptor.cs
- EncodingInfo.cs
- XmlParserContext.cs
- EndpointDesigner.cs
- ActivityBuilderXamlWriter.cs
- BaseCollection.cs
- NetworkAddressChange.cs
- SmiContextFactory.cs
- CallbackValidator.cs
- IriParsingElement.cs
- IndentedTextWriter.cs
- ReachDocumentSequenceSerializer.cs
- HwndProxyElementProvider.cs
- DefaultTextStore.cs
- LambdaSerializationException.cs
- Exceptions.cs
- ManipulationStartedEventArgs.cs
- ComponentGlyph.cs
- EtwProvider.cs
- versioninfo.cs
- XPathArrayIterator.cs
- COM2FontConverter.cs
- HierarchicalDataTemplate.cs
- ArraySet.cs
- PersonalizationEntry.cs
- ToolStripSplitButton.cs
- HttpGetProtocolImporter.cs
- GACMembershipCondition.cs
- RunClient.cs
- LockCookie.cs
- EnumerableRowCollection.cs
- lengthconverter.cs
- WebZone.cs
- TransformPattern.cs
- XslVisitor.cs
- Convert.cs
- BuildProviderAppliesToAttribute.cs
- EnvironmentPermission.cs
- TriggerBase.cs
- BackgroundFormatInfo.cs
- RequestCacheEntry.cs
- xdrvalidator.cs
- ReservationNotFoundException.cs
- SessionParameter.cs
- ISO2022Encoding.cs
- CodeCastExpression.cs
- SBCSCodePageEncoding.cs
- ApplicationServiceManager.cs
- IIS7UserPrincipal.cs
- StringCollectionMarkupSerializer.cs
- MonitorWrapper.cs
- PrimitiveXmlSerializers.cs
- ListViewItem.cs
- Stopwatch.cs
- StylusCaptureWithinProperty.cs
- WebSysDescriptionAttribute.cs
- HttpSessionStateBase.cs
- ExpandCollapseProviderWrapper.cs
- EntityParameterCollection.cs
- DbProviderFactory.cs
- ProcessModuleCollection.cs
- DynamicDataRouteHandler.cs
- DataSet.cs