Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / HttpTransportElement.cs / 1 / HttpTransportElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel; using System.Globalization; using System.Net; using System.Net.Security; using System.Security.Principal; using System.ServiceModel.Channels; public partial class HttpTransportElement : TransportElement { public HttpTransportElement() { } [ConfigurationProperty(ConfigurationStrings.AllowCookies, DefaultValue = HttpTransportDefaults.AllowCookies)] public bool AllowCookies { get { return (bool)base[ConfigurationStrings.AllowCookies]; } set { base[ConfigurationStrings.AllowCookies] = value; } } [ConfigurationProperty(ConfigurationStrings.AuthenticationScheme, DefaultValue = HttpTransportDefaults.AuthenticationScheme)] [StandardRuntimeEnumValidator(typeof(AuthenticationSchemes))] public AuthenticationSchemes AuthenticationScheme { get {return (AuthenticationSchemes) base[ConfigurationStrings.AuthenticationScheme]; } set {base[ConfigurationStrings.AuthenticationScheme] = value; } } public override Type BindingElementType { get {return typeof(HttpTransportBindingElement); } } [ConfigurationProperty(ConfigurationStrings.BypassProxyOnLocal, DefaultValue = HttpTransportDefaults.BypassProxyOnLocal)] public bool BypassProxyOnLocal { get {return (bool) base[ConfigurationStrings.BypassProxyOnLocal]; } set {base[ConfigurationStrings.BypassProxyOnLocal] = value; } } [ConfigurationProperty(ConfigurationStrings.HostNameComparisonMode, DefaultValue = HttpTransportDefaults.HostNameComparisonMode)] [ServiceModelEnumValidator(typeof(HostNameComparisonModeHelper))] public HostNameComparisonMode HostNameComparisonMode { get { return (HostNameComparisonMode)base[ConfigurationStrings.HostNameComparisonMode]; } set { base[ConfigurationStrings.HostNameComparisonMode] = value; } } [ConfigurationProperty(ConfigurationStrings.KeepAliveEnabled, DefaultValue = HttpTransportDefaults.KeepAliveEnabled)] public bool KeepAliveEnabled { get { return (bool)base[ConfigurationStrings.KeepAliveEnabled]; } set { base[ConfigurationStrings.KeepAliveEnabled] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxBufferSize, DefaultValue = TransportDefaults.MaxBufferSize)] [IntegerValidator(MinValue = 1)] public int MaxBufferSize { get { return (int)base[ConfigurationStrings.MaxBufferSize]; } set { base[ConfigurationStrings.MaxBufferSize] = value; } } [ConfigurationProperty(ConfigurationStrings.ProxyAddress, DefaultValue = HttpTransportDefaults.ProxyAddress)] public Uri ProxyAddress { get {return (Uri) base[ConfigurationStrings.ProxyAddress]; } set {base[ConfigurationStrings.ProxyAddress] = value; } } [ConfigurationProperty(ConfigurationStrings.ProxyAuthenticationScheme, DefaultValue = HttpTransportDefaults.ProxyAuthenticationScheme)] [StandardRuntimeEnumValidator(typeof(AuthenticationSchemes))] public AuthenticationSchemes ProxyAuthenticationScheme { get { return (AuthenticationSchemes)base[ConfigurationStrings.ProxyAuthenticationScheme]; } set { base[ConfigurationStrings.ProxyAuthenticationScheme] = value; } } [ConfigurationProperty(ConfigurationStrings.Realm, DefaultValue = HttpTransportDefaults.Realm)] [StringValidator(MinLength = 0)] public string Realm { get {return (string) base[ConfigurationStrings.Realm]; } set { if (String.IsNullOrEmpty(value)) { value = String.Empty; } base[ConfigurationStrings.Realm] = value; } } [ConfigurationProperty(ConfigurationStrings.TransferMode, DefaultValue = HttpTransportDefaults.TransferMode)] [ServiceModelEnumValidator(typeof(TransferModeHelper))] public TransferMode TransferMode { get { return (TransferMode)base[ConfigurationStrings.TransferMode]; } set { base[ConfigurationStrings.TransferMode] = value; } } [ConfigurationProperty(ConfigurationStrings.UnsafeConnectionNtlmAuthentication, DefaultValue = HttpTransportDefaults.UnsafeConnectionNtlmAuthentication)] public bool UnsafeConnectionNtlmAuthentication { get { return (bool)base[ConfigurationStrings.UnsafeConnectionNtlmAuthentication]; } set { base[ConfigurationStrings.UnsafeConnectionNtlmAuthentication] = value; } } [ConfigurationProperty(ConfigurationStrings.UseDefaultWebProxy, DefaultValue = HttpTransportDefaults.UseDefaultWebProxy)] public bool UseDefaultWebProxy { get { return (bool)base[ConfigurationStrings.UseDefaultWebProxy]; } set { base[ConfigurationStrings.UseDefaultWebProxy] = value; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); HttpTransportBindingElement binding = (HttpTransportBindingElement)bindingElement; binding.AllowCookies = this.AllowCookies; binding.AuthenticationScheme = this.AuthenticationScheme; binding.BypassProxyOnLocal = this.BypassProxyOnLocal; binding.KeepAliveEnabled = this.KeepAliveEnabled; binding.HostNameComparisonMode = this.HostNameComparisonMode; PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.MaxBufferSize].ValueOrigin != PropertyValueOrigin.Default) { binding.MaxBufferSize = this.MaxBufferSize; } binding.ProxyAddress = this.ProxyAddress; binding.ProxyAuthenticationScheme = this.ProxyAuthenticationScheme; binding.Realm = this.Realm; binding.TransferMode = this.TransferMode; binding.UnsafeConnectionNtlmAuthentication = this.UnsafeConnectionNtlmAuthentication; binding.UseDefaultWebProxy = this.UseDefaultWebProxy; } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); HttpTransportElement source = (HttpTransportElement) from; #pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument this.AllowCookies = source.AllowCookies; this.AuthenticationScheme = source.AuthenticationScheme; this.BypassProxyOnLocal = source.BypassProxyOnLocal; this.KeepAliveEnabled = source.KeepAliveEnabled; this.HostNameComparisonMode = source.HostNameComparisonMode; this.MaxBufferSize = source.MaxBufferSize; this.ProxyAddress = source.ProxyAddress; this.ProxyAuthenticationScheme = source.ProxyAuthenticationScheme; this.Realm = source.Realm; this.TransferMode = source.TransferMode; this.UnsafeConnectionNtlmAuthentication = source.UnsafeConnectionNtlmAuthentication; this.UseDefaultWebProxy = source.UseDefaultWebProxy; } protected override TransportBindingElement CreateDefaultBindingElement() { return new HttpTransportBindingElement(); } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); HttpTransportBindingElement source = (HttpTransportBindingElement)bindingElement; this.AllowCookies = source.AllowCookies; this.AuthenticationScheme = source.AuthenticationScheme; this.BypassProxyOnLocal = source.BypassProxyOnLocal; this.KeepAliveEnabled = source.KeepAliveEnabled; this.HostNameComparisonMode = source.HostNameComparisonMode; this.MaxBufferSize = source.MaxBufferSize; this.ProxyAddress = source.ProxyAddress; this.ProxyAuthenticationScheme = source.ProxyAuthenticationScheme; this.Realm = source.Realm; this.TransferMode = source.TransferMode; this.UnsafeConnectionNtlmAuthentication = source.UnsafeConnectionNtlmAuthentication; this.UseDefaultWebProxy = source.UseDefaultWebProxy; } } } // 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
- ConsoleEntryPoint.cs
- ListViewGroup.cs
- TextParagraphView.cs
- TypeReference.cs
- HtmlPanelAdapter.cs
- DocumentPaginator.cs
- SocketException.cs
- UnsafeNativeMethods.cs
- TheQuery.cs
- Int32RectValueSerializer.cs
- MulticastOption.cs
- WebHttpBinding.cs
- OdbcException.cs
- InstanceView.cs
- StatusBarItemAutomationPeer.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- XPathSingletonIterator.cs
- XsdValidatingReader.cs
- FileDialogCustomPlacesCollection.cs
- EntryWrittenEventArgs.cs
- ConfigPathUtility.cs
- ApplicationHost.cs
- TextRangeEditTables.cs
- IndependentlyAnimatedPropertyMetadata.cs
- BindingCollection.cs
- WhitespaceRuleLookup.cs
- TraceRecord.cs
- HMAC.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- shaperfactoryquerycacheentry.cs
- InvokeGenerator.cs
- FlowDocument.cs
- MissingManifestResourceException.cs
- StorageBasedPackageProperties.cs
- DynamicActivityProperty.cs
- AssemblyBuilder.cs
- SettingsPropertyCollection.cs
- CorruptStoreException.cs
- TextTreeDeleteContentUndoUnit.cs
- DataServiceContext.cs
- GenericTextProperties.cs
- TimeZoneNotFoundException.cs
- EncodingTable.cs
- IUnknownConstantAttribute.cs
- ScriptingJsonSerializationSection.cs
- ConsoleKeyInfo.cs
- UnlockInstanceAsyncResult.cs
- WebBrowsableAttribute.cs
- IPipelineRuntime.cs
- GetIndexBinder.cs
- DataGridRow.cs
- ControlsConfig.cs
- FaultCallbackWrapper.cs
- ServiceInfoCollection.cs
- TrustLevelCollection.cs
- HttpModulesSection.cs
- WebServiceResponse.cs
- ColumnMapProcessor.cs
- DataGridViewColumnEventArgs.cs
- DataGridViewHitTestInfo.cs
- CollectionContainer.cs
- TimelineCollection.cs
- TrustManagerPromptUI.cs
- HandlerFactoryCache.cs
- OleCmdHelper.cs
- DataGridViewColumnDesigner.cs
- DataTableTypeConverter.cs
- WebPartConnectionCollection.cs
- MsmqInputChannelListenerBase.cs
- Stroke.cs
- KerberosReceiverSecurityToken.cs
- XPathNodeInfoAtom.cs
- SchemaNotation.cs
- PassportPrincipal.cs
- LambdaCompiler.Expressions.cs
- RsaSecurityTokenAuthenticator.cs
- TrackingDataItemValue.cs
- Size.cs
- MemoryMappedViewAccessor.cs
- Walker.cs
- LicenseContext.cs
- SQLDateTimeStorage.cs
- ApplicationHost.cs
- PointAnimationClockResource.cs
- RelationshipDetailsRow.cs
- FilterUserControlBase.cs
- ExtendedProperty.cs
- XamlDesignerSerializationManager.cs
- EncryptedPackage.cs
- Deflater.cs
- CriticalExceptions.cs
- IndexOutOfRangeException.cs
- EditorOptionAttribute.cs
- TabItemWrapperAutomationPeer.cs
- ping.cs
- LinqMaximalSubtreeNominator.cs
- columnmapkeybuilder.cs
- CodeDomConfigurationHandler.cs
- TargetException.cs
- DataContract.cs