Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Configuration / WebHttpSecurityElement.cs / 1305376 / 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"); } if (this.ElementInformation.Properties["mode"].IsModified) { 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewLinkCell.cs
- HttpErrorTraceRecord.cs
- OracleConnection.cs
- CmsInterop.cs
- LeaseManager.cs
- ReflectEventDescriptor.cs
- ApplicationManager.cs
- ManifestResourceInfo.cs
- BezierSegment.cs
- DataGridViewSelectedRowCollection.cs
- WinInetCache.cs
- SimpleWorkerRequest.cs
- GridToolTip.cs
- ListBindingHelper.cs
- XPathNode.cs
- TextFormatterContext.cs
- ListItemParagraph.cs
- RouteParser.cs
- ContextDataSource.cs
- BamlBinaryReader.cs
- FileDialog_Vista.cs
- XmlMtomReader.cs
- OutputScopeManager.cs
- MapPathBasedVirtualPathProvider.cs
- DataRowComparer.cs
- Timer.cs
- SerializationInfo.cs
- DependentList.cs
- PrinterUnitConvert.cs
- AudioException.cs
- MediaTimeline.cs
- PointCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- dataobject.cs
- RolePrincipal.cs
- WindowsFormsLinkLabel.cs
- dataobject.cs
- ResourcePart.cs
- FileUtil.cs
- TypeDescriptionProviderAttribute.cs
- PieceNameHelper.cs
- GrammarBuilderRuleRef.cs
- InputBindingCollection.cs
- PeerNearMe.cs
- ContextMenu.cs
- FillBehavior.cs
- Column.cs
- EmptyEnumerator.cs
- RefreshEventArgs.cs
- TripleDES.cs
- ZoomPercentageConverter.cs
- Int32RectConverter.cs
- TextEditorCopyPaste.cs
- LineServicesCallbacks.cs
- CookieHandler.cs
- OracleBFile.cs
- PropertyEmitterBase.cs
- ProcessRequestArgs.cs
- SQLInt64Storage.cs
- FormsAuthenticationUserCollection.cs
- AndCondition.cs
- AuthenticationService.cs
- OperationAbortedException.cs
- PropertyToken.cs
- AsymmetricSignatureFormatter.cs
- EntityRecordInfo.cs
- BrowserCapabilitiesFactoryBase.cs
- ClockGroup.cs
- XmlSchemaSet.cs
- SqlCommand.cs
- NodeInfo.cs
- SecurityUtils.cs
- ListViewItemEventArgs.cs
- Image.cs
- EditingCoordinator.cs
- WorkflowItemsPresenter.cs
- ModelTreeEnumerator.cs
- ExtensionElementCollection.cs
- SubclassTypeValidatorAttribute.cs
- VoiceChangeEventArgs.cs
- Choices.cs
- OracleInternalConnection.cs
- SHA256.cs
- SymbolEqualComparer.cs
- ParenthesizePropertyNameAttribute.cs
- EventKeyword.cs
- HealthMonitoringSection.cs
- MouseWheelEventArgs.cs
- SignatureResourcePool.cs
- DesignerRegionCollection.cs
- ActiveDocumentEvent.cs
- LinqDataSourceInsertEventArgs.cs
- SqlUserDefinedAggregateAttribute.cs
- RemoveStoryboard.cs
- IUnknownConstantAttribute.cs
- Thread.cs
- WebBrowserContainer.cs
- NativeMethodsOther.cs
- ScopelessEnumAttribute.cs
- WindowsToolbar.cs