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

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

namespace System.ServiceModel.Dispatcher 
{
    using System; 
 
    class ImmutableCommunicationTimeouts : IDefaultCommunicationTimeouts
    { 
        TimeSpan close;
        TimeSpan open;
        TimeSpan receive;
        TimeSpan send; 

        internal ImmutableCommunicationTimeouts() 
            : this(null) 
        {
        } 

        internal ImmutableCommunicationTimeouts(IDefaultCommunicationTimeouts timeouts)
        {
            if (timeouts == null) 
            {
                this.close = ServiceDefaults.CloseTimeout; 
                this.open = ServiceDefaults.OpenTimeout; 
                this.receive = ServiceDefaults.ReceiveTimeout;
                this.send = ServiceDefaults.SendTimeout; 
            }
            else
            {
                this.close = timeouts.CloseTimeout; 
                this.open = timeouts.OpenTimeout;
                this.receive = timeouts.ReceiveTimeout; 
                this.send = timeouts.SendTimeout; 
            }
        } 

        TimeSpan IDefaultCommunicationTimeouts.CloseTimeout
        {
            get { return this.close; } 
        }
 
        TimeSpan IDefaultCommunicationTimeouts.OpenTimeout 
        {
            get { return this.open; } 
        }

        TimeSpan IDefaultCommunicationTimeouts.ReceiveTimeout
        { 
            get { return this.receive; }
        } 
 
        TimeSpan IDefaultCommunicationTimeouts.SendTimeout
        { 
            get { return this.send; }
        }
    }
} 

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