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
- Overlapped.cs
- XmlUrlResolver.cs
- ListBindingHelper.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TableParagraph.cs
- DocumentXmlWriter.cs
- SelectionEditingBehavior.cs
- OutputScopeManager.cs
- ExpressionConverter.cs
- ResXResourceSet.cs
- WorkflowRuntime.cs
- ServiceElement.cs
- DocumentEventArgs.cs
- DiscoveryClientReferences.cs
- CalendarTable.cs
- EdmPropertyAttribute.cs
- SR.cs
- ListBoxItemAutomationPeer.cs
- SimpleExpression.cs
- UrlUtility.cs
- StorageModelBuildProvider.cs
- EnumerableRowCollectionExtensions.cs
- CqlIdentifiers.cs
- rsa.cs
- RtfNavigator.cs
- VoiceInfo.cs
- FrameworkObject.cs
- control.ime.cs
- ParsedRoute.cs
- BindingSourceDesigner.cs
- ImageListUtils.cs
- CornerRadius.cs
- BinaryUtilClasses.cs
- LocatorGroup.cs
- RedBlackList.cs
- ListViewContainer.cs
- EmptyQuery.cs
- SymLanguageVendor.cs
- CodeBinaryOperatorExpression.cs
- UIPermission.cs
- SelectedGridItemChangedEvent.cs
- RSAPKCS1SignatureFormatter.cs
- Rethrow.cs
- Inflater.cs
- ServicesUtilities.cs
- HttpProxyCredentialType.cs
- StaticContext.cs
- Adorner.cs
- FixedSOMPageElement.cs
- DropShadowBitmapEffect.cs
- CompilerResults.cs
- ClearTypeHintValidation.cs
- SpinWait.cs
- CodeArgumentReferenceExpression.cs
- DataBindingExpressionBuilder.cs
- CompareInfo.cs
- BitmapCodecInfo.cs
- InstancePersistenceCommandException.cs
- SizeLimitedCache.cs
- LocalizableResourceBuilder.cs
- DBAsyncResult.cs
- UserPreferenceChangingEventArgs.cs
- HttpCachePolicy.cs
- Pair.cs
- WebPartVerb.cs
- StringToken.cs
- Imaging.cs
- Operator.cs
- ListBox.cs
- PageEventArgs.cs
- MessageQueue.cs
- Int32Collection.cs
- TypePresenter.xaml.cs
- ForEachAction.cs
- CodeGenerator.cs
- Int64Animation.cs
- ClientUrlResolverWrapper.cs
- DynamicILGenerator.cs
- XmlBinaryReaderSession.cs
- OleDbEnumerator.cs
- ImageIndexConverter.cs
- SchemeSettingElement.cs
- OleDbInfoMessageEvent.cs
- UserControl.cs
- BasicHttpMessageSecurityElement.cs
- Directory.cs
- CryptoStream.cs
- TdsValueSetter.cs
- _UriTypeConverter.cs
- DesignTimeDataBinding.cs
- SplitContainerDesigner.cs
- WindowsIdentity.cs
- ValuePatternIdentifiers.cs
- ObjectDataSourceChooseMethodsPanel.cs
- WebConfigurationManager.cs
- RewritingProcessor.cs
- ConfigXmlAttribute.cs
- HttpPostClientProtocol.cs
- ConfigPathUtility.cs
- FormViewInsertedEventArgs.cs