Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / TransportElement.cs / 1 / TransportElement.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Configuration
{
using System.Configuration;
using System.ServiceModel.Channels;
public abstract partial class TransportElement : BindingElementExtensionElement
{
protected TransportElement()
{
}
public override void ApplyConfiguration(BindingElement bindingElement)
{
base.ApplyConfiguration(bindingElement);
TransportBindingElement binding = (TransportBindingElement)bindingElement;
binding.ManualAddressing = this.ManualAddressing;
binding.MaxBufferPoolSize = this.MaxBufferPoolSize;
binding.MaxReceivedMessageSize = this.MaxReceivedMessageSize;
}
public override void CopyFrom(ServiceModelExtensionElement from)
{
base.CopyFrom(from);
TransportElement source = (TransportElement)from;
#pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument
this.ManualAddressing = source.ManualAddressing;
this.MaxBufferPoolSize = source.MaxBufferPoolSize;
this.MaxReceivedMessageSize = source.MaxReceivedMessageSize;
}
protected internal override BindingElement CreateBindingElement()
{
TransportBindingElement binding = this.CreateDefaultBindingElement();
this.ApplyConfiguration(binding);
return binding;
}
protected abstract TransportBindingElement CreateDefaultBindingElement();
protected internal override void InitializeFrom(BindingElement bindingElement)
{
base.InitializeFrom(bindingElement);
TransportBindingElement binding = (TransportBindingElement)bindingElement;
this.ManualAddressing = binding.ManualAddressing;
this.MaxBufferPoolSize = binding.MaxBufferPoolSize;
this.MaxReceivedMessageSize = binding.MaxReceivedMessageSize;
}
[ConfigurationProperty(ConfigurationStrings.ManualAddressing, DefaultValue = false)]
public bool ManualAddressing
{
get { return (bool)base[ConfigurationStrings.ManualAddressing]; }
set { base[ConfigurationStrings.ManualAddressing] = value; }
}
[ConfigurationProperty(ConfigurationStrings.MaxBufferPoolSize, DefaultValue = TransportDefaults.MaxBufferPoolSize)]
[LongValidator(MinValue = 1)]
public long MaxBufferPoolSize
{
get { return (long)base[ConfigurationStrings.MaxBufferPoolSize]; }
set { base[ConfigurationStrings.MaxBufferPoolSize] = value; }
}
[ConfigurationProperty(ConfigurationStrings.MaxReceivedMessageSize, DefaultValue = TransportDefaults.MaxReceivedMessageSize)]
[LongValidator(MinValue = 1)]
public long MaxReceivedMessageSize
{
get { return (long)base[ConfigurationStrings.MaxReceivedMessageSize]; }
set { base[ConfigurationStrings.MaxReceivedMessageSize] = value; }
}
}
}
// 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
- DiscoveryVersionConverter.cs
- SqlInternalConnectionTds.cs
- Helpers.cs
- GeneralTransformGroup.cs
- MasterPage.cs
- PasswordRecovery.cs
- Memoizer.cs
- OracleCommandBuilder.cs
- DocumentViewerHelper.cs
- PropertyPathConverter.cs
- XamlSerializerUtil.cs
- HtmlInputFile.cs
- LongSumAggregationOperator.cs
- TreeViewHitTestInfo.cs
- BinHexEncoder.cs
- TreeNodeStyle.cs
- NetStream.cs
- ModulesEntry.cs
- SkewTransform.cs
- CrossContextChannel.cs
- StringStorage.cs
- SequenceFullException.cs
- ObjectTag.cs
- StateMachineWorkflow.cs
- XmlSchema.cs
- RadioButtonPopupAdapter.cs
- SafeFileMapViewHandle.cs
- WebPartsSection.cs
- AutomationProperty.cs
- HtmlHistory.cs
- HashMembershipCondition.cs
- PackageDocument.cs
- RootBuilder.cs
- DynamicPropertyHolder.cs
- SqlRecordBuffer.cs
- ListInitExpression.cs
- selecteditemcollection.cs
- RangeBase.cs
- isolationinterop.cs
- ReleaseInstanceMode.cs
- X509CertificateCollection.cs
- LabelDesigner.cs
- XmlObjectSerializerReadContext.cs
- GatewayDefinition.cs
- ChtmlTextWriter.cs
- Transform3DGroup.cs
- DecimalConstantAttribute.cs
- ModelItemExtensions.cs
- Boolean.cs
- DynamicRouteExpression.cs
- TokenBasedSetEnumerator.cs
- PackagingUtilities.cs
- UnsafeNativeMethods.cs
- SmiEventSink.cs
- EntityDataSourceReferenceGroup.cs
- TemplatedMailWebEventProvider.cs
- DebugTracing.cs
- ObjectSet.cs
- ThrowHelper.cs
- PagesSection.cs
- WebEncodingValidator.cs
- PeerObject.cs
- DataColumnSelectionConverter.cs
- UIHelper.cs
- ExpressionCopier.cs
- SHA256.cs
- XhtmlTextWriter.cs
- JavascriptCallbackResponseProperty.cs
- PixelShader.cs
- DataTableCollection.cs
- KeyValueConfigurationElement.cs
- DetailsViewRow.cs
- GlyphInfoList.cs
- EdmSchemaAttribute.cs
- CustomErrorsSectionWrapper.cs
- CharacterMetricsDictionary.cs
- SpecularMaterial.cs
- WebServiceAttribute.cs
- LambdaCompiler.Address.cs
- elementinformation.cs
- PEFileEvidenceFactory.cs
- StateMachineTimers.cs
- ScrollChrome.cs
- AspNetSynchronizationContext.cs
- ServiceX509SecurityTokenProvider.cs
- ChangeDirector.cs
- QilLiteral.cs
- ObjectCache.cs
- OdbcReferenceCollection.cs
- HierarchicalDataSourceIDConverter.cs
- SafeEventLogWriteHandle.cs
- ViewPort3D.cs
- ItemTypeToolStripMenuItem.cs
- SqlNodeAnnotations.cs
- EditorZone.cs
- TextShapeableCharacters.cs
- FilterQueryOptionExpression.cs
- ExtendedPropertyDescriptor.cs
- ProcessModelInfo.cs
- SettingsPropertyWrongTypeException.cs