NetPipeSectionData.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 / SMSvcHost / System / ServiceModel / Activation / NetPipeSectionData.cs / 1 / NetPipeSectionData.cs

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

namespace System.ServiceModel.Activation 
{
    using System.Collections.Generic; 
    using System.Security.Principal; 
    using System.Configuration;
    using System.Diagnostics; 
    using System.ServiceModel.Diagnostics;
    using System.ServiceModel.Activation.Configuration;

    class NetPipeSectionData 
    {
        int maxPendingConnections; 
        int maxPendingAccepts; 
        TimeSpan receiveTimeout;
        List allowAccounts; 

        public NetPipeSectionData()
        {
            NetPipeSection section = (NetPipeSection)ConfigurationManager.GetSection(ConfigurationStrings.NetPipeSectionPath); 
            if (section == null)
            { 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException()); 
            }
 
            this.maxPendingConnections = section.MaxPendingConnections;
            this.maxPendingAccepts = section.MaxPendingAccepts;
            this.receiveTimeout = section.ReceiveTimeout;
            this.allowAccounts = new List(); 
            foreach (SecurityIdentifierElement element in section.AllowAccounts)
            { 
                this.allowAccounts.Add(element.SecurityIdentifier); 
            }
        } 

        public int MaxPendingConnections
        {
            get 
            {
                return this.maxPendingConnections; 
            } 
        }
 
        public int MaxPendingAccepts
        {
            get
            { 
                return this.maxPendingAccepts;
            } 
        } 
        public TimeSpan ReceiveTimeout
        { 
            get
            {
                return this.receiveTimeout;
            } 
        }
 
        public List AllowAccounts 
        {
            get 
            {
                return this.allowAccounts;
            }
        } 
    }
} 

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