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
- PropertyToken.cs
- AvTraceFormat.cs
- MetadataResolver.cs
- NumericExpr.cs
- ClientOperation.cs
- WizardPanel.cs
- VsPropertyGrid.cs
- DataGridViewLinkColumn.cs
- Vector.cs
- KeyInfo.cs
- MemoryFailPoint.cs
- DataServiceProcessingPipeline.cs
- SqlDataSourceCommandEventArgs.cs
- CodeThrowExceptionStatement.cs
- TextTrailingWordEllipsis.cs
- GlyphInfoList.cs
- ColorComboBox.cs
- XmlIgnoreAttribute.cs
- PropertyManager.cs
- XPathDocument.cs
- MarginCollapsingState.cs
- XmlSerializerFactory.cs
- ResXResourceSet.cs
- SerTrace.cs
- DeviceFilterDictionary.cs
- RelatedEnd.cs
- DecodeHelper.cs
- HighlightVisual.cs
- ObjectResult.cs
- CompModSwitches.cs
- ToolStripItemDataObject.cs
- CssTextWriter.cs
- UserControlParser.cs
- DateRangeEvent.cs
- AnnotationService.cs
- NetStream.cs
- DataGridCommandEventArgs.cs
- GenericEnumerator.cs
- Page.cs
- ConfigXmlComment.cs
- EntityDataSourceSelectingEventArgs.cs
- ThaiBuddhistCalendar.cs
- SwitchAttribute.cs
- CodeMethodMap.cs
- FilteredSchemaElementLookUpTable.cs
- ModelVisual3D.cs
- CollectionDataContractAttribute.cs
- ConnectionsZoneDesigner.cs
- AuthorizationSection.cs
- AmbiguousMatchException.cs
- ToolStripItem.cs
- BackgroundWorker.cs
- PropertyRecord.cs
- DynamicILGenerator.cs
- MDIControlStrip.cs
- DayRenderEvent.cs
- XmlArrayItemAttribute.cs
- WrapperEqualityComparer.cs
- RootAction.cs
- BatchServiceHost.cs
- TextRunCacheImp.cs
- DiscoveryDocumentReference.cs
- UniformGrid.cs
- SplayTreeNode.cs
- ELinqQueryState.cs
- VolatileEnlistmentState.cs
- DeviceOverridableAttribute.cs
- NonDualMessageSecurityOverHttp.cs
- ServiceOperation.cs
- ValidatingReaderNodeData.cs
- DispatcherSynchronizationContext.cs
- DataReaderContainer.cs
- _OverlappedAsyncResult.cs
- TargetPerspective.cs
- RegexCompiler.cs
- XmlQueryCardinality.cs
- InputScopeConverter.cs
- SHA1.cs
- FileDialogPermission.cs
- TextPointer.cs
- IndicShape.cs
- DllNotFoundException.cs
- StorageComplexPropertyMapping.cs
- WindowsFont.cs
- HtmlTitle.cs
- Stack.cs
- WebPartAuthorizationEventArgs.cs
- COM2ICategorizePropertiesHandler.cs
- ListDesigner.cs
- Proxy.cs
- SaveFileDialog.cs
- DataGridTemplateColumn.cs
- FunctionImportMapping.cs
- MatrixIndependentAnimationStorage.cs
- UnsafeNativeMethods.cs
- SwitchDesigner.xaml.cs
- HttpCacheParams.cs
- SendSecurityHeaderElement.cs
- RightsManagementSuppressedStream.cs
- Comparer.cs