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
- ObjectHelper.cs
- NativeCompoundFileAPIs.cs
- WindowClosedEventArgs.cs
- ReachIDocumentPaginatorSerializer.cs
- UpdateException.cs
- GridLength.cs
- UnauthorizedAccessException.cs
- DetailsViewDeletedEventArgs.cs
- StringExpressionSet.cs
- InternalConfigHost.cs
- EntityCommandExecutionException.cs
- ProfileSettings.cs
- SchemaEntity.cs
- NativeMethods.cs
- ExceptionHandlersDesigner.cs
- __ComObject.cs
- SchemaImporterExtensionElementCollection.cs
- FileBasedResourceGroveler.cs
- RtfToXamlLexer.cs
- MailWriter.cs
- XmlWrappingWriter.cs
- WebProxyScriptElement.cs
- InstanceCompleteException.cs
- ComplusEndpointConfigContainer.cs
- PrivilegedConfigurationManager.cs
- CodeArrayCreateExpression.cs
- COM2AboutBoxPropertyDescriptor.cs
- ApplicationCommands.cs
- HeaderLabel.cs
- XamlSerializationHelper.cs
- LineVisual.cs
- PointHitTestParameters.cs
- odbcmetadatacolumnnames.cs
- XmlLanguage.cs
- MemoryStream.cs
- ResourceDictionaryCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- RootBrowserWindowAutomationPeer.cs
- _StreamFramer.cs
- Encoder.cs
- DbConnectionFactory.cs
- ServiceContractGenerator.cs
- FormCollection.cs
- AutoGeneratedField.cs
- ClonableStack.cs
- SpinWait.cs
- TextParaClient.cs
- serverconfig.cs
- UDPClient.cs
- DynamicQueryableWrapper.cs
- InfoCard.cs
- MessageSecurityOverTcpElement.cs
- Block.cs
- DockingAttribute.cs
- ApplicationProxyInternal.cs
- IResourceProvider.cs
- BindingValueChangedEventArgs.cs
- DigestComparer.cs
- DBParameter.cs
- __Filters.cs
- AddInController.cs
- FactoryId.cs
- Verify.cs
- CustomAttributeFormatException.cs
- ListViewDeletedEventArgs.cs
- CLSCompliantAttribute.cs
- selecteditemcollection.cs
- ImmutableObjectAttribute.cs
- ChangesetResponse.cs
- ButtonFlatAdapter.cs
- ItemContainerProviderWrapper.cs
- SectionInformation.cs
- SignedInfo.cs
- BufferedGraphicsContext.cs
- ContextInformation.cs
- BindableTemplateBuilder.cs
- TypeReference.cs
- WebHttpDispatchOperationSelector.cs
- Camera.cs
- PtsHost.cs
- login.cs
- OpCodes.cs
- ToolStripItemEventArgs.cs
- PointF.cs
- AttachInfo.cs
- VisualTreeUtils.cs
- SizeIndependentAnimationStorage.cs
- TextRunTypographyProperties.cs
- SafeNativeMethods.cs
- PropertyDescriptorCollection.cs
- ProcessHostMapPath.cs
- QuadraticEase.cs
- XmlToDatasetMap.cs
- ImagingCache.cs
- ChameleonKey.cs
- XmlCustomFormatter.cs
- ConnectionStringsExpressionBuilder.cs
- MediaContext.cs
- ThreadStateException.cs
- DashStyles.cs