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

                            //------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel
{ 
    using System.ServiceModel.Configuration;
 
    public abstract class TransactionProtocol 
    {
        public static TransactionProtocol Default 
        {
            get { return OleTransactions; }
        }
 
        public static TransactionProtocol OleTransactions
        { 
            get { return OleTransactionsProtocol.Instance; } 
        }
 
        public static TransactionProtocol WSAtomicTransactionOctober2004
        {
            get { return WSAtomicTransactionOctober2004Protocol.Instance; }
        } 

        public static TransactionProtocol WSAtomicTransaction11 
        { 
            get { return WSAtomicTransaction11Protocol.Instance; }
        } 

        internal abstract string Name
        {
            get; 
        }
 
        internal static bool IsDefined(TransactionProtocol transactionProtocol) 
        {
            return transactionProtocol == TransactionProtocol.OleTransactions || 
                   transactionProtocol == TransactionProtocol.WSAtomicTransactionOctober2004 ||
                   transactionProtocol == TransactionProtocol.WSAtomicTransaction11;
        }
    } 

    class OleTransactionsProtocol : TransactionProtocol 
    { 
        static TransactionProtocol instance = new OleTransactionsProtocol();
 
        internal static TransactionProtocol Instance
        {
            get { return instance; }
        } 

        internal override string Name 
        { 
            get { return ConfigurationStrings.OleTransactions; }
        } 
    }

    class WSAtomicTransactionOctober2004Protocol : TransactionProtocol
    { 
        static TransactionProtocol instance = new WSAtomicTransactionOctober2004Protocol();
 
        internal static TransactionProtocol Instance 
        {
            get { return instance; } 
        }

        internal override string Name
        { 
            get { return ConfigurationStrings.WSAtomicTransactionOctober2004; }
        } 
    } 

    class WSAtomicTransaction11Protocol : TransactionProtocol 
    {
        static TransactionProtocol instance = new WSAtomicTransaction11Protocol();

        internal static TransactionProtocol Instance 
        {
            get { return instance; } 
        } 

        internal override string Name 
        {
            get { return ConfigurationStrings.WSAtomicTransaction11; }
        }
    } 
}

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