NamedPipeTransportElement.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / NamedPipeTransportElement.cs / 1 / NamedPipeTransportElement.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel.Configuration 
{
    using System.Configuration; 
    using System.Globalization; 
    using System.ServiceModel.Channels;
 
    public sealed partial class NamedPipeTransportElement : ConnectionOrientedTransportElement
    {
        public NamedPipeTransportElement()
        { 
        }
 
        public override Type BindingElementType 
        {
            get { return typeof(NamedPipeTransportBindingElement); } 
        }

        public override void ApplyConfiguration(BindingElement bindingElement)
        { 
            base.ApplyConfiguration(bindingElement);
            NamedPipeTransportBindingElement binding = (NamedPipeTransportBindingElement)bindingElement; 
#pragma warning suppress 56506 //[....]; base.ApplyConfiguration above checks for bindingElement being null 
            this.ConnectionPoolSettings.ApplyConfiguration(binding.ConnectionPoolSettings);
        } 

        protected internal override void InitializeFrom(BindingElement bindingElement)
        {
            base.InitializeFrom(bindingElement); 
#pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument
            NamedPipeTransportBindingElement binding = (NamedPipeTransportBindingElement)bindingElement; 
            this.ConnectionPoolSettings.InitializeFrom(binding.ConnectionPoolSettings); 
        }
 
        public override void CopyFrom(ServiceModelExtensionElement from)
        {
            base.CopyFrom(from);
            NamedPipeTransportElement source = (NamedPipeTransportElement)from; 
#pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument
            this.ConnectionPoolSettings.CopyFrom(source.ConnectionPoolSettings); 
        } 

        protected override TransportBindingElement CreateDefaultBindingElement() 
        {
            return new NamedPipeTransportBindingElement();
        }
 
        [ConfigurationProperty(ConfigurationStrings.ConnectionPoolSettings)]
        public NamedPipeConnectionPoolSettingsElement ConnectionPoolSettings 
        { 
            get { return (NamedPipeConnectionPoolSettingsElement)base[ConfigurationStrings.ConnectionPoolSettings]; }
            set { base[ConfigurationStrings.ConnectionPoolSettings] = value; } 
        }
    }
}
 

 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK