Ppl.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 / TransactionBridge / Microsoft / Transactions / Bridge / Ppl.cs / 2 / Ppl.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Diagnostics; 
using System.Security.Permissions;
using System.Runtime.Serialization; 
using System.Threading; 
using System.Transactions;
using System.ServiceModel.Transactions; 

namespace Microsoft.Transactions.Bridge
{
    ///  
    ///
    ///  
    enum Status 
    {
        Success, 
        Error,

        Committed,
        Aborted, 
        Prepared,
        Readonly, 
        PrePrepared, 
        InDoubt,
 
        DuplicateTransaction,
        TooLate,
        TransactionNotFound,
        TooManySubordinateEnlistments, 
        InvalidRecoveryData,
 
        LocalPropagation, 
        DuplicatePropagation
    } 

    /// 
    /// note: this is a place holder for state, it does not mean that state
    /// will ultimately be defined via an enum.  State transistion diagram 
    /// is TBS in PPL spec.
    ///  
    enum TransactionManagerState 
    {
        Uninitialized, 
        Initialized,
        Starting,
        Started,
        Stopping, 
        Stopped
    } 
 
    /// TransactionManagerCallback delegate
    ///  
    /// Defines callback for TransactionManagerCoordinatorService
    /// and TransactionManagerPropagateService methods.
    /// 
    delegate void TransactionManagerCallback( 
        Enlistment enlistment, Status status, object state );
 
    class EnlistmentOptions 
    {
        public EnlistmentOptions() 
        {
            expires = new TimeSpan(0, 5, 0);
            isoLevel = IsolationLevel.Unspecified;
        } 

        public TimeSpan Expires 
        { 
            get{ return expires; }
            set{ expires = value; } 
        }

        public IsolationLevel IsoLevel
        { 
            get{ return isoLevel; }
            set{ isoLevel = value; } 
        } 

        public IsolationFlags IsolationFlags 
        {
            get{ return this.isoFlags; }
            set{ this.isoFlags = value; }
        } 

        public ulong IsolationFlagsLong 
        { 
            get{ return (ulong)this.isoFlags; }
            set{ this.isoFlags = (IsolationFlags)value; } 
        }

        public string Description
        { 
            get{ return description; }
            set{ description = value; } 
        } 

        TimeSpan expires; 
        IsolationLevel isoLevel;
        IsolationFlags isoFlags;
        string description;
    } 

} 

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