Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ConnectionOrientedTransportElement.cs / 1 / ConnectionOrientedTransportElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel; using System.Net.Security; using System.Security.Principal; using System.ServiceModel.Channels; using System.ComponentModel; public abstract partial class ConnectionOrientedTransportElement : TransportElement { internal ConnectionOrientedTransportElement() { } [ConfigurationProperty(ConfigurationStrings.ConnectionBufferSize, DefaultValue = ConnectionOrientedTransportDefaults.ConnectionBufferSize)] [IntegerValidator(MinValue = 1)] public int ConnectionBufferSize { get {return (int) base[ConfigurationStrings.ConnectionBufferSize]; } set {base[ConfigurationStrings.ConnectionBufferSize] = value; } } [ConfigurationProperty(ConfigurationStrings.HostNameComparisonMode, DefaultValue = ConnectionOrientedTransportDefaults.HostNameComparisonMode)] [ServiceModelEnumValidatorAttribute(typeof(HostNameComparisonModeHelper))] public HostNameComparisonMode HostNameComparisonMode { get { return (HostNameComparisonMode)base[ConfigurationStrings.HostNameComparisonMode]; } set { base[ConfigurationStrings.HostNameComparisonMode] = value; } } [ConfigurationProperty(ConfigurationStrings.ChannelInitializationTimeout, DefaultValue = ConnectionOrientedTransportDefaults.ChannelInitializationTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanOneTick)] public TimeSpan ChannelInitializationTimeout { get { return (TimeSpan)base[ConfigurationStrings.ChannelInitializationTimeout]; } set { base[ConfigurationStrings.ChannelInitializationTimeout] = 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.MaxPendingConnections, DefaultValue = ConnectionOrientedTransportDefaults.MaxPendingConnections)] [IntegerValidator(MinValue = 1)] public int MaxPendingConnections { get {return (int) base[ConfigurationStrings.MaxPendingConnections]; } set {base[ConfigurationStrings.MaxPendingConnections] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxOutputDelay, DefaultValue = ConnectionOrientedTransportDefaults.MaxOutputDelayString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan MaxOutputDelay { get {return (TimeSpan) base[ConfigurationStrings.MaxOutputDelay]; } set {base[ConfigurationStrings.MaxOutputDelay] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxPendingAccepts, DefaultValue = ConnectionOrientedTransportDefaults.MaxPendingAccepts)] [IntegerValidator(MinValue = 1)] public int MaxPendingAccepts { get {return (int) base[ConfigurationStrings.MaxPendingAccepts]; } set {base[ConfigurationStrings.MaxPendingAccepts] = value; } } [ConfigurationProperty(ConfigurationStrings.TransferMode, DefaultValue = ConnectionOrientedTransportDefaults.TransferMode)] [ServiceModelEnumValidator(typeof(TransferModeHelper))] public TransferMode TransferMode { get {return (TransferMode) base[ConfigurationStrings.TransferMode]; } set {base[ConfigurationStrings.TransferMode] = value; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); ConnectionOrientedTransportBindingElement binding = (ConnectionOrientedTransportBindingElement) bindingElement; binding.ConnectionBufferSize = this.ConnectionBufferSize; binding.HostNameComparisonMode = this.HostNameComparisonMode; binding.ChannelInitializationTimeout = this.ChannelInitializationTimeout; PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.MaxBufferSize].ValueOrigin != PropertyValueOrigin.Default) { binding.MaxBufferSize = this.MaxBufferSize; } binding.MaxPendingConnections = this.MaxPendingConnections; binding.MaxOutputDelay = this.MaxOutputDelay; binding.MaxPendingAccepts = this.MaxPendingAccepts; binding.TransferMode = this.TransferMode; } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ConnectionOrientedTransportElement source = (ConnectionOrientedTransportElement) from; #pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument this.ConnectionBufferSize = source.ConnectionBufferSize; this.HostNameComparisonMode = source.HostNameComparisonMode; this.ChannelInitializationTimeout = source.ChannelInitializationTimeout; this.MaxBufferSize = source.MaxBufferSize; this.MaxPendingConnections = source.MaxPendingConnections; this.MaxOutputDelay = source.MaxOutputDelay; this.MaxPendingAccepts = source.MaxPendingAccepts; this.TransferMode = source.TransferMode; } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); ConnectionOrientedTransportBindingElement binding = (ConnectionOrientedTransportBindingElement) bindingElement; this.ConnectionBufferSize = binding.ConnectionBufferSize; this.HostNameComparisonMode = binding.HostNameComparisonMode; this.ChannelInitializationTimeout = binding.ChannelInitializationTimeout; this.MaxBufferSize = binding.MaxBufferSize; this.MaxPendingConnections = binding.MaxPendingConnections; this.MaxOutputDelay = binding.MaxOutputDelay; this.MaxPendingAccepts = binding.MaxPendingAccepts; this.TransferMode = binding.TransferMode; } } } // 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
- CustomTypeDescriptor.cs
- VirtualPathUtility.cs
- ErrorWebPart.cs
- FragmentQueryKB.cs
- StreamGeometryContext.cs
- SqlNotificationRequest.cs
- PackageRelationshipCollection.cs
- DbConnectionStringCommon.cs
- DBPropSet.cs
- SessionStateItemCollection.cs
- QueryableDataSourceHelper.cs
- TextDecorationCollection.cs
- ErrorRuntimeConfig.cs
- IApplicationTrustManager.cs
- EntityDataSource.cs
- LinkedResource.cs
- ModuleConfigurationInfo.cs
- XPathAncestorIterator.cs
- PixelFormatConverter.cs
- Deserializer.cs
- DataFieldConverter.cs
- TransformedBitmap.cs
- AssemblyInfo.cs
- DbExpressionBuilder.cs
- TokenBasedSet.cs
- NativeMethods.cs
- SqlTypesSchemaImporter.cs
- Mutex.cs
- DataGridViewComboBoxCell.cs
- SqlCacheDependencyDatabaseCollection.cs
- AppDomainUnloadedException.cs
- PLINQETWProvider.cs
- GridViewRowPresenterBase.cs
- Matrix3DConverter.cs
- TrustManagerPromptUI.cs
- TextRangeEditLists.cs
- SafeNativeMethods.cs
- Binding.cs
- FrameworkContentElementAutomationPeer.cs
- IgnoreFlushAndCloseStream.cs
- MultipartIdentifier.cs
- TreeNodeBinding.cs
- CodePropertyReferenceExpression.cs
- WebPartTransformerCollection.cs
- ScopelessEnumAttribute.cs
- Memoizer.cs
- base64Transforms.cs
- MessageBox.cs
- MailMessageEventArgs.cs
- _NetworkingPerfCounters.cs
- PaintEvent.cs
- XPathEmptyIterator.cs
- SystemWebSectionGroup.cs
- RegexReplacement.cs
- UriExt.cs
- ProxyElement.cs
- HtmlInputButton.cs
- Section.cs
- XhtmlConformanceSection.cs
- AnalyzedTree.cs
- EmulateRecognizeCompletedEventArgs.cs
- XmlWriterTraceListener.cs
- ExtendedPropertyCollection.cs
- XmlImplementation.cs
- TemplateControlCodeDomTreeGenerator.cs
- Win32.cs
- CmsInterop.cs
- InvocationExpression.cs
- ConfigXmlSignificantWhitespace.cs
- SocketPermission.cs
- DbProviderFactories.cs
- PageAdapter.cs
- HttpProfileGroupBase.cs
- IdnMapping.cs
- StringToken.cs
- Ports.cs
- SlipBehavior.cs
- BamlResourceDeserializer.cs
- relpropertyhelper.cs
- CalendarSelectionChangedEventArgs.cs
- ToolboxComponentsCreatingEventArgs.cs
- TrustLevelCollection.cs
- RadialGradientBrush.cs
- TakeOrSkipWhileQueryOperator.cs
- ShutDownListener.cs
- GridViewItemAutomationPeer.cs
- RelatedView.cs
- MembershipSection.cs
- AppDomainUnloadedException.cs
- MsmqInputChannelListener.cs
- _CommandStream.cs
- ModifierKeysConverter.cs
- XPathBuilder.cs
- ConnectionConsumerAttribute.cs
- ServiceModelExtensionElement.cs
- EntityProviderServices.cs
- KeyInstance.cs
- QueryOperatorEnumerator.cs
- CompositeTypefaceMetrics.cs
- PointConverter.cs