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
- HashSetEqualityComparer.cs
- DataControlButton.cs
- FaultContractInfo.cs
- DataPointer.cs
- Interfaces.cs
- ToolStripItem.cs
- EdmToObjectNamespaceMap.cs
- RecordConverter.cs
- NTAccount.cs
- EDesignUtil.cs
- Binding.cs
- TextLineBreak.cs
- PointAnimationUsingPath.cs
- WindowsListViewSubItem.cs
- ListBase.cs
- CursorInteropHelper.cs
- XmlMapping.cs
- StylusDevice.cs
- IHttpResponseInternal.cs
- FileEnumerator.cs
- RecognizedWordUnit.cs
- GeneralTransformGroup.cs
- TemplateKey.cs
- UIElementIsland.cs
- HtmlMeta.cs
- BaseDataList.cs
- EditorPartCollection.cs
- RepeaterItem.cs
- HttpPostedFile.cs
- MethodBuilderInstantiation.cs
- Itemizer.cs
- ForeignKeyConstraint.cs
- GlyphingCache.cs
- ButtonChrome.cs
- ObjectAnimationBase.cs
- TrackPointCollection.cs
- XmlReturnWriter.cs
- ADRoleFactory.cs
- PackageRelationshipSelector.cs
- ZipIORawDataFileBlock.cs
- Span.cs
- HtmlTernaryTree.cs
- EnumerableWrapperWeakToStrong.cs
- BaseWebProxyFinder.cs
- OdbcConnectionHandle.cs
- LicenseProviderAttribute.cs
- VisualTarget.cs
- LayoutEngine.cs
- PackWebRequest.cs
- ColorTransformHelper.cs
- QilTernary.cs
- SpeechAudioFormatInfo.cs
- Metadata.cs
- ObjectContextServiceProvider.cs
- CodeTypeReference.cs
- ToolStripContentPanelRenderEventArgs.cs
- DrawingContext.cs
- PageCatalogPart.cs
- LocatorManager.cs
- DbParameterHelper.cs
- Partitioner.cs
- ImageFormatConverter.cs
- NonBatchDirectoryCompiler.cs
- LinkTarget.cs
- RadialGradientBrush.cs
- DefaultBinder.cs
- EntityFrameworkVersions.cs
- ToolStripSplitStackLayout.cs
- Point3DConverter.cs
- FormViewPagerRow.cs
- DbRetry.cs
- BinaryParser.cs
- ObjectQueryProvider.cs
- Menu.cs
- Error.cs
- AutomationProperties.cs
- DbParameterHelper.cs
- ServiceOperationDetailViewControl.cs
- OdbcException.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DataServiceRequestArgs.cs
- ComponentCollection.cs
- WeakEventTable.cs
- PanelDesigner.cs
- TextReader.cs
- IncrementalHitTester.cs
- RowUpdatedEventArgs.cs
- HttpServerVarsCollection.cs
- Operand.cs
- StateItem.cs
- BindingList.cs
- StructuredTypeInfo.cs
- XmlSerializerNamespaces.cs
- AnnotationStore.cs
- LinkDesigner.cs
- SchemaNamespaceManager.cs
- RawStylusActions.cs
- SqlEnums.cs
- SymLanguageVendor.cs
- SizeChangedInfo.cs