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
- BitmapEffectGeneralTransform.cs
- Crc32.cs
- HexParser.cs
- XmlArrayItemAttributes.cs
- XmlElementAttribute.cs
- IBuiltInEvidence.cs
- SourceSwitch.cs
- ExitEventArgs.cs
- EncoderBestFitFallback.cs
- StylusPlugInCollection.cs
- SchemaImporterExtensionElement.cs
- PrincipalPermission.cs
- OutputScope.cs
- CommonXSendMessage.cs
- EventLogPermissionAttribute.cs
- SpecularMaterial.cs
- IssuedTokenClientCredential.cs
- ConnectionConsumerAttribute.cs
- Grid.cs
- EditorZoneBase.cs
- CodeDelegateCreateExpression.cs
- SingleAnimationUsingKeyFrames.cs
- ToolBarButton.cs
- APCustomTypeDescriptor.cs
- SHA512CryptoServiceProvider.cs
- RegexFCD.cs
- SiteMapNode.cs
- WSDualHttpSecurityMode.cs
- HMACSHA512.cs
- ReadContentAsBinaryHelper.cs
- SchemaReference.cs
- LayoutInformation.cs
- XamlInterfaces.cs
- DataContractSerializerMessageContractImporter.cs
- StylusButtonCollection.cs
- cookiecontainer.cs
- MappingException.cs
- DataGridTable.cs
- StylusEventArgs.cs
- ServerValidateEventArgs.cs
- LongAverageAggregationOperator.cs
- SafeFileMappingHandle.cs
- VersionedStream.cs
- Win32PrintDialog.cs
- ResourceSetExpression.cs
- CodePageUtils.cs
- PropertyEntry.cs
- RegisteredHiddenField.cs
- DependencyObject.cs
- ManipulationPivot.cs
- PolyLineSegment.cs
- XmlSchemaExternal.cs
- WebHttpElement.cs
- InputBinding.cs
- ToolboxControl.cs
- SemanticAnalyzer.cs
- EndpointReference.cs
- ImportCatalogPart.cs
- SimpleTypesSurrogate.cs
- CursorConverter.cs
- Tile.cs
- Stack.cs
- GlyphRun.cs
- CodePageUtils.cs
- RTTrackingProfile.cs
- FolderBrowserDialog.cs
- TrackingMemoryStreamFactory.cs
- WebReferenceOptions.cs
- NameValueConfigurationElement.cs
- BindingExpressionUncommonField.cs
- SqlDataSourceFilteringEventArgs.cs
- RectIndependentAnimationStorage.cs
- DetailsViewRowCollection.cs
- Types.cs
- StreamUpdate.cs
- PropertyCondition.cs
- ClientFormsIdentity.cs
- DataShape.cs
- ObjectStateManager.cs
- DynamicILGenerator.cs
- ContourSegment.cs
- FilteredXmlReader.cs
- XPathAncestorQuery.cs
- DebuggerService.cs
- IpcClientManager.cs
- PreservationFileWriter.cs
- Image.cs
- SafeCryptContextHandle.cs
- CompilationUtil.cs
- DataGridViewButtonColumn.cs
- BindingRestrictions.cs
- ReflectionUtil.cs
- ReadOnlyObservableCollection.cs
- MyContact.cs
- RectangleHotSpot.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- XamlTreeBuilder.cs
- ControlBuilderAttribute.cs
- Pointer.cs