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
- Point3DAnimationBase.cs
- ListViewTableRow.cs
- SecureStringHasher.cs
- BinaryKeyIdentifierClause.cs
- XPathNodeHelper.cs
- CriticalFileToken.cs
- SqlEnums.cs
- BitmapCodecInfoInternal.cs
- SchemaAttDef.cs
- indexingfiltermarshaler.cs
- GlyphInfoList.cs
- BindValidationContext.cs
- FixedSOMTableRow.cs
- InstanceDescriptor.cs
- HtmlInputPassword.cs
- SecurityState.cs
- UpdatePanelTrigger.cs
- GeometryGroup.cs
- GridViewSelectEventArgs.cs
- CompositeScriptReferenceEventArgs.cs
- XmlSerializationGeneratedCode.cs
- DeclaredTypeValidator.cs
- GridViewColumnHeaderAutomationPeer.cs
- Baml6Assembly.cs
- Overlapped.cs
- CollectionMarkupSerializer.cs
- TypeNameHelper.cs
- WorkflowRuntimeEndpoint.cs
- XmlSchemaObjectCollection.cs
- BitmapScalingModeValidation.cs
- StackOverflowException.cs
- LookupBindingPropertiesAttribute.cs
- AnnotationDocumentPaginator.cs
- PathFigure.cs
- LinkedDataMemberFieldEditor.cs
- SingleObjectCollection.cs
- MetadataArtifactLoaderFile.cs
- DataQuery.cs
- ClientSponsor.cs
- CommandDevice.cs
- WebPartEditVerb.cs
- DiscriminatorMap.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- HttpCacheParams.cs
- XmlSerializerVersionAttribute.cs
- TextEffectCollection.cs
- InputReport.cs
- EventSinkHelperWriter.cs
- LocationSectionRecord.cs
- WebPartConnectionsConfigureVerb.cs
- DataGridViewTopLeftHeaderCell.cs
- TextParaLineResult.cs
- Reference.cs
- PropertyTab.cs
- SqlFunctionAttribute.cs
- DependencyObjectType.cs
- WinCategoryAttribute.cs
- ScrollEvent.cs
- ToolStripSplitStackLayout.cs
- EventProperty.cs
- FontDifferentiator.cs
- Timer.cs
- input.cs
- MessageQueueConverter.cs
- ListViewGroupCollectionEditor.cs
- PolicyStatement.cs
- TemplateBuilder.cs
- XmlAnyElementAttributes.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- ObjectSet.cs
- CryptoStream.cs
- TrustManagerPromptUI.cs
- DataGridViewTextBoxCell.cs
- ObjectViewFactory.cs
- TextBoxAutoCompleteSourceConverter.cs
- XmlBinaryReaderSession.cs
- PolicyValidationException.cs
- SqlCachedBuffer.cs
- ActiveDocumentEvent.cs
- sqlinternaltransaction.cs
- ZipPackage.cs
- CustomErrorsSectionWrapper.cs
- ProviderConnectionPoint.cs
- WeakHashtable.cs
- SchemaMapping.cs
- NetTcpBinding.cs
- ApplicationFileParser.cs
- Activator.cs
- _DisconnectOverlappedAsyncResult.cs
- altserialization.cs
- NonClientArea.cs
- ExpressionWriter.cs
- Rect3D.cs
- RegistryDataKey.cs
- BinaryKeyIdentifierClause.cs
- DataSet.cs
- TraceEventCache.cs
- Int32Storage.cs
- OverlappedAsyncResult.cs
- ISFClipboardData.cs