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
- GridViewRowCollection.cs
- DPTypeDescriptorContext.cs
- autovalidator.cs
- SimpleHandlerFactory.cs
- MissingSatelliteAssemblyException.cs
- CodeGroup.cs
- CompoundFileReference.cs
- BaseResourcesBuildProvider.cs
- TraceHandler.cs
- SizeChangedInfo.cs
- PcmConverter.cs
- ActivityTypeCodeDomSerializer.cs
- Oid.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- FastEncoderWindow.cs
- dbdatarecord.cs
- NavigationEventArgs.cs
- TextContainerChangedEventArgs.cs
- SpecularMaterial.cs
- NativeMethods.cs
- Event.cs
- MulticastDelegate.cs
- MappingModelBuildProvider.cs
- Light.cs
- GridViewUpdatedEventArgs.cs
- TextTabProperties.cs
- MouseWheelEventArgs.cs
- BooleanFacetDescriptionElement.cs
- ToolZone.cs
- ManagementEventArgs.cs
- SkewTransform.cs
- XmlSerializer.cs
- SpotLight.cs
- FreezableCollection.cs
- EncodingNLS.cs
- CachedPathData.cs
- RegexMatchCollection.cs
- ProcessHostMapPath.cs
- Visual3DCollection.cs
- Permission.cs
- TypeUnloadedException.cs
- CapiSafeHandles.cs
- MemberHolder.cs
- RuntimeArgument.cs
- PropertyConverter.cs
- CodeDirectiveCollection.cs
- EndpointIdentity.cs
- TileModeValidation.cs
- TextParaClient.cs
- UserUseLicenseDictionaryLoader.cs
- x509store.cs
- ControlBindingsCollection.cs
- Substitution.cs
- RuleSetBrowserDialog.cs
- HierarchicalDataBoundControlAdapter.cs
- BufferedWebEventProvider.cs
- ThemeDictionaryExtension.cs
- CssStyleCollection.cs
- AnimationStorage.cs
- ZipIOExtraFieldElement.cs
- CompoundFileIOPermission.cs
- CloudCollection.cs
- InputElement.cs
- ClonableStack.cs
- SecurityTokenRequirement.cs
- OperationGenerator.cs
- UniqueIdentifierService.cs
- HashAlgorithm.cs
- _SslState.cs
- ClientCultureInfo.cs
- ListViewItem.cs
- BitmapEffectState.cs
- DateTimeFormat.cs
- TextDecorations.cs
- TypeUsageBuilder.cs
- SuppressMergeCheckAttribute.cs
- WebPartsSection.cs
- RadioButtonBaseAdapter.cs
- PassportIdentity.cs
- RankException.cs
- CommentEmitter.cs
- EtwTrace.cs
- DesignBindingConverter.cs
- FormViewUpdateEventArgs.cs
- GenerateTemporaryTargetAssembly.cs
- TileModeValidation.cs
- ThrowHelper.cs
- UICuesEvent.cs
- ReliableSessionBindingElement.cs
- HtmlInputFile.cs
- Compiler.cs
- MetadataCache.cs
- BuilderPropertyEntry.cs
- DoubleLink.cs
- HtmlLinkAdapter.cs
- _ListenerRequestStream.cs
- Speller.cs
- DesignerCalendarAdapter.cs
- VisualBasic.cs
- DockingAttribute.cs