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
- DataServiceRequestException.cs
- ISSmlParser.cs
- ClusterSafeNativeMethods.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Exceptions.cs
- SqlCacheDependencyDatabase.cs
- RoleGroupCollection.cs
- FileSystemEventArgs.cs
- XmlCompatibilityReader.cs
- MessageEnumerator.cs
- LicenseContext.cs
- TypeInitializationException.cs
- SessionViewState.cs
- Monitor.cs
- XamlPoint3DCollectionSerializer.cs
- EnumerableRowCollectionExtensions.cs
- SingleTagSectionHandler.cs
- DefaultPropertiesToSend.cs
- ManifestSignatureInformation.cs
- ColorMatrix.cs
- odbcmetadatacollectionnames.cs
- WebPartTransformer.cs
- ProviderSettingsCollection.cs
- SqlUdtInfo.cs
- ScriptControlDescriptor.cs
- ProfileGroupSettings.cs
- _FtpControlStream.cs
- SiteOfOriginPart.cs
- MemberRestriction.cs
- UntypedNullExpression.cs
- BitmapMetadataBlob.cs
- EventMappingSettingsCollection.cs
- ChtmlTextWriter.cs
- FontCacheUtil.cs
- TreeNode.cs
- Comparer.cs
- ResourceDescriptionAttribute.cs
- EntityKey.cs
- rsa.cs
- SchemaManager.cs
- PositiveTimeSpanValidatorAttribute.cs
- Vector3DCollectionValueSerializer.cs
- ExpressionVisitor.cs
- TextBlock.cs
- AppDomainProtocolHandler.cs
- ContentPresenter.cs
- TextElementEnumerator.cs
- SignedPkcs7.cs
- CategoryGridEntry.cs
- ZipArchive.cs
- CounterCreationDataCollection.cs
- COM2TypeInfoProcessor.cs
- UnmanagedBitmapWrapper.cs
- DataListItemEventArgs.cs
- ModelUIElement3D.cs
- StorageEntitySetMapping.cs
- StickyNote.cs
- ComplexPropertyEntry.cs
- DelayedRegex.cs
- ConfigXmlComment.cs
- ObjectSecurity.cs
- DeferredElementTreeState.cs
- TraceProvider.cs
- XamlTemplateSerializer.cs
- FunctionDescription.cs
- LowerCaseStringConverter.cs
- DataSourceXmlTextReader.cs
- SimpleType.cs
- CodeObjectCreateExpression.cs
- GrammarBuilderPhrase.cs
- DataDocumentXPathNavigator.cs
- Literal.cs
- AppDomainAttributes.cs
- VisualBasicExpressionConverter.cs
- RoutedEvent.cs
- PTManager.cs
- SimpleTypeResolver.cs
- FacetDescriptionElement.cs
- PackageFilter.cs
- TreeNodeBindingCollection.cs
- DummyDataSource.cs
- WhileDesigner.cs
- BlockUIContainer.cs
- UITypeEditor.cs
- BufferedStream.cs
- SizeAnimationBase.cs
- TranslateTransform3D.cs
- MenuItemBindingCollection.cs
- AssemblyInfo.cs
- StrokeFIndices.cs
- xsdvalidator.cs
- WebDisplayNameAttribute.cs
- Compensate.cs
- OlePropertyStructs.cs
- DirtyTextRange.cs
- DataIdProcessor.cs
- CodeMethodMap.cs
- TextRenderer.cs
- DSACryptoServiceProvider.cs
- AnchorEditor.cs