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
- ParallelLoopState.cs
- TraceSection.cs
- translator.cs
- AppendHelper.cs
- CancelEventArgs.cs
- RayHitTestParameters.cs
- AttributeData.cs
- MobileTextWriter.cs
- SecurityElement.cs
- ProxyElement.cs
- DependencyObject.cs
- PropertyContainer.cs
- Subtree.cs
- FacetDescriptionElement.cs
- FixUp.cs
- RotateTransform.cs
- XmlDictionaryReaderQuotas.cs
- DesignerCommandAdapter.cs
- DataViewSetting.cs
- DbExpressionVisitor.cs
- UriTemplateLiteralQueryValue.cs
- ResourceReader.cs
- TabControl.cs
- WebConvert.cs
- DataBindingExpressionBuilder.cs
- CollectionViewGroupInternal.cs
- DynamicDiscoSearcher.cs
- CqlWriter.cs
- ProviderConnectionPointCollection.cs
- ConfigurationLoaderException.cs
- DictionaryEntry.cs
- RightsManagementInformation.cs
- UntypedNullExpression.cs
- ForEachDesigner.xaml.cs
- SqlNamer.cs
- RC2CryptoServiceProvider.cs
- Membership.cs
- QilName.cs
- WindowsListViewGroupHelper.cs
- Point4DConverter.cs
- SchemaImporterExtensionElement.cs
- _FixedSizeReader.cs
- ExpressionBinding.cs
- ChtmlSelectionListAdapter.cs
- BufferModeSettings.cs
- TrustLevel.cs
- WebServiceEnumData.cs
- UnsafeNativeMethods.cs
- ActiveDesignSurfaceEvent.cs
- MenuItemAutomationPeer.cs
- GridViewItemAutomationPeer.cs
- __Filters.cs
- RelationshipConstraintValidator.cs
- BitmapScalingModeValidation.cs
- PropertyInfoSet.cs
- StatusStrip.cs
- ObjectItemCollection.cs
- MessagingDescriptionAttribute.cs
- NavigationProgressEventArgs.cs
- ScriptingSectionGroup.cs
- SecurityPermission.cs
- SecurityPermission.cs
- FilterException.cs
- MinMaxParagraphWidth.cs
- SupportingTokenSpecification.cs
- UIElementParagraph.cs
- OracleConnectionString.cs
- Selection.cs
- _AcceptOverlappedAsyncResult.cs
- ChildDocumentBlock.cs
- ConfigurationManager.cs
- ImageSourceConverter.cs
- MultiBinding.cs
- UriSectionData.cs
- UInt64Storage.cs
- QueryConverter.cs
- XmlSchemaSimpleType.cs
- JavascriptCallbackBehaviorAttribute.cs
- DateTimeOffsetConverter.cs
- CollectionViewProxy.cs
- Vector3D.cs
- TraceShell.cs
- TraceSection.cs
- RectAnimationBase.cs
- CustomAttributeFormatException.cs
- FragmentNavigationEventArgs.cs
- ListBox.cs
- Queue.cs
- ItemType.cs
- PropertyGridEditorPart.cs
- InputLangChangeRequestEvent.cs
- SystemIPGlobalProperties.cs
- DefaultSettingsSection.cs
- printdlgexmarshaler.cs
- VisualStyleElement.cs
- DockPanel.cs
- LOSFormatter.cs
- UnmanagedHandle.cs
- UnaryOperationBinder.cs
- arclist.cs