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
- NavigationExpr.cs
- OrderablePartitioner.cs
- SlipBehavior.cs
- SmtpNtlmAuthenticationModule.cs
- LinkConverter.cs
- RoleManagerEventArgs.cs
- BitmapCodecInfo.cs
- DecoderFallback.cs
- VectorConverter.cs
- DataTable.cs
- SqlMetaData.cs
- JoinCqlBlock.cs
- DistinctQueryOperator.cs
- CodeTypeDeclarationCollection.cs
- TextServicesManager.cs
- EventLogPermission.cs
- XmlAnyElementAttributes.cs
- WindowsListViewGroup.cs
- RIPEMD160Managed.cs
- DiscoveryServerProtocol.cs
- ToolboxItemCollection.cs
- GeneralTransform3DGroup.cs
- QuaternionRotation3D.cs
- SelectionProviderWrapper.cs
- TrackBarRenderer.cs
- GeometryHitTestParameters.cs
- AnnotationAuthorChangedEventArgs.cs
- RequestQueryParser.cs
- KeyboardDevice.cs
- ManagedIStream.cs
- DBAsyncResult.cs
- RuntimeWrappedException.cs
- MultiTrigger.cs
- SystemNetHelpers.cs
- Cloud.cs
- RadioButtonPopupAdapter.cs
- CqlParserHelpers.cs
- UriTemplateClientFormatter.cs
- DesignTimeParseData.cs
- VisualStyleTypesAndProperties.cs
- MasterPage.cs
- _AuthenticationState.cs
- BamlLocalizer.cs
- PanelStyle.cs
- SynchronizedDispatch.cs
- TypeElement.cs
- Cursor.cs
- TextWriter.cs
- ProfessionalColors.cs
- CodeIdentifier.cs
- ToolBarOverflowPanel.cs
- FileUtil.cs
- MultipleViewProviderWrapper.cs
- XmlHierarchyData.cs
- DataBoundControlHelper.cs
- SqlCommandSet.cs
- ZoneButton.cs
- MemberRelationshipService.cs
- QuaternionRotation3D.cs
- ConfigurationPermission.cs
- ZipIOExtraField.cs
- iisPickupDirectory.cs
- ADMembershipUser.cs
- NavigationWindow.cs
- FontUnit.cs
- InertiaRotationBehavior.cs
- BasicHttpSecurityMode.cs
- GcSettings.cs
- TableRow.cs
- ComplusEndpointConfigContainer.cs
- MenuItemCollection.cs
- CustomTypeDescriptor.cs
- JavaScriptSerializer.cs
- DataListItem.cs
- HashHelper.cs
- TextParagraphProperties.cs
- Trace.cs
- TextBoxAutoCompleteSourceConverter.cs
- PropertyInfoSet.cs
- RoleBoolean.cs
- TemplateBindingExtension.cs
- TagPrefixInfo.cs
- sqlmetadatafactory.cs
- __FastResourceComparer.cs
- TransactionTraceIdentifier.cs
- AssemblyInfo.cs
- FastEncoder.cs
- ReachDocumentSequenceSerializerAsync.cs
- FixedTextSelectionProcessor.cs
- WindowsPrincipal.cs
- HashHelper.cs
- CommandField.cs
- UriSectionData.cs
- NativeMethods.cs
- IisTraceWebEventProvider.cs
- TextComposition.cs
- SerializationInfo.cs
- BamlResourceSerializer.cs
- CategoriesDocumentFormatter.cs
- LinqDataSourceInsertEventArgs.cs