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
- ToolstripProfessionalRenderer.cs
- ViewStateAttachedPropertyFeature.cs
- JournalNavigationScope.cs
- DriveNotFoundException.cs
- Speller.cs
- NavigationProperty.cs
- DataGridViewElement.cs
- GridViewColumn.cs
- Stylus.cs
- TableLayoutColumnStyleCollection.cs
- DesignOnlyAttribute.cs
- KeyGestureConverter.cs
- followingquery.cs
- CqlErrorHelper.cs
- TransformGroup.cs
- NativeMethodsOther.cs
- Point3DCollection.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- HttpResponseInternalWrapper.cs
- Vector3DCollection.cs
- Quaternion.cs
- CodeDOMProvider.cs
- DataServiceRequest.cs
- ValueUtilsSmi.cs
- Calendar.cs
- ClrProviderManifest.cs
- HttpListenerPrefixCollection.cs
- QilStrConcatenator.cs
- PropertyOverridesDialog.cs
- WSSecurityXXX2005.cs
- OracleConnectionFactory.cs
- MarkupExtensionParser.cs
- AutomationPropertyChangedEventArgs.cs
- ModelTreeEnumerator.cs
- BamlResourceSerializer.cs
- SerTrace.cs
- Task.cs
- BaseDataListComponentEditor.cs
- AssemblyName.cs
- ConfigUtil.cs
- StorageFunctionMapping.cs
- HandleCollector.cs
- StrongNameHelpers.cs
- ModulesEntry.cs
- GradientBrush.cs
- XmlEncoding.cs
- ModifiableIteratorCollection.cs
- ClickablePoint.cs
- XmlSchemaSimpleContentRestriction.cs
- AbsoluteQuery.cs
- SqlCacheDependencySection.cs
- Suspend.cs
- BitConverter.cs
- UnsafeNativeMethods.cs
- EncoderParameters.cs
- GetPageCompletedEventArgs.cs
- ParsedAttributeCollection.cs
- SQLByteStorage.cs
- WindowsFormsLinkLabel.cs
- Annotation.cs
- AtomicFile.cs
- PointLight.cs
- WindowsEditBox.cs
- ScriptingJsonSerializationSection.cs
- DataGridViewLinkCell.cs
- SafeNativeMethodsCLR.cs
- DataGridViewColumnTypeEditor.cs
- LinqDataSourceStatusEventArgs.cs
- PropertyReference.cs
- LineServicesRun.cs
- SqlTypesSchemaImporter.cs
- SecurityDocument.cs
- Privilege.cs
- UIElementCollection.cs
- ListBox.cs
- XmlWriter.cs
- CacheChildrenQuery.cs
- ApplicationActivator.cs
- PerformanceCounterPermissionAttribute.cs
- XmlException.cs
- XpsS0ValidatingLoader.cs
- ChannelManager.cs
- _ChunkParse.cs
- BinaryObjectReader.cs
- ObjectViewListener.cs
- Rotation3D.cs
- XmlSchemaProviderAttribute.cs
- BindUriHelper.cs
- DataGridViewCellMouseEventArgs.cs
- SequenceRange.cs
- QilGenerator.cs
- NotifyCollectionChangedEventArgs.cs
- ManagedFilter.cs
- ApplicationSecurityInfo.cs
- EntityPropertyMappingAttribute.cs
- MULTI_QI.cs
- DataGridViewRowHeaderCell.cs
- SynchronousReceiveElement.cs
- AttributeUsageAttribute.cs
- EdmProviderManifest.cs