NetNamedPipeSecurityElement.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 / NetNamedPipeSecurityElement.cs / 1 / NetNamedPipeSecurityElement.cs

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

namespace System.ServiceModel.Configuration 
{
    using System.Configuration; 
    using System.ServiceModel.Channels; 
    using System.Globalization;
    using System.Net; 
    using System.Net.Security;
    using System.ServiceModel;
    using System.ServiceModel.Security;
    using System.ComponentModel; 

    public sealed partial class NetNamedPipeSecurityElement : ConfigurationElement 
    { 
        [ConfigurationProperty(ConfigurationStrings.Mode, DefaultValue = NetNamedPipeSecurity.DefaultMode)]
        [ServiceModelEnumValidator(typeof(NetNamedPipeSecurityModeHelper))] 
        public NetNamedPipeSecurityMode Mode
        {
            get { return (NetNamedPipeSecurityMode)base[ConfigurationStrings.Mode]; }
            set { base[ConfigurationStrings.Mode] = value; } 
        }
 
        [ConfigurationProperty(ConfigurationStrings.Transport)] 
        public NamedPipeTransportSecurityElement Transport
        { 
            get { return (NamedPipeTransportSecurityElement)base[ConfigurationStrings.Transport]; }
        }

        internal void ApplyConfiguration(NetNamedPipeSecurity security) 
        {
            if (security == null) 
            { 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security");
            } 
            security.Mode = this.Mode;
            this.Transport.ApplyConfiguration(security.Transport);
        }
 
        internal void InitializeFrom(NetNamedPipeSecurity security)
        { 
            if (security == null) 
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security"); 
            }
            this.Mode = security.Mode;
            this.Transport.InitializeFrom(security.Transport);
        } 
    }
} 

// 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