public ParticipantEnlistment(ProtocolState state, Enlistment coordinatorEnlistment, TransactionContextManager contextManager) : base(state)
 {
     this.protocol                           = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC;
     base.ourContextManager                  = contextManager;
     base.enlistment                         = new Enlistment();
     base.enlistment.LocalTransactionId      = coordinatorEnlistment.LocalTransactionId;
     base.enlistment.RemoteTransactionId     = coordinatorEnlistment.RemoteTransactionId;
     base.enlistment.NotificationMask        = Notifications.Volatile | Notifications.TwoPhaseCommit;
     base.enlistment.ProtocolProviderContext = this;
     base.stateMachine                       = new SubordinateStateMachine(this);
     base.stateMachine.ChangeState(state.States.SubordinateInitializing);
 }
 public ParticipantEnlistment(ProtocolState state, Enlistment coordinatorEnlistment, TransactionContextManager contextManager) : base(state)
 {
     this.protocol = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC;
     base.ourContextManager = contextManager;
     base.enlistment = new Enlistment();
     base.enlistment.LocalTransactionId = coordinatorEnlistment.LocalTransactionId;
     base.enlistment.RemoteTransactionId = coordinatorEnlistment.RemoteTransactionId;
     base.enlistment.NotificationMask = Notifications.Volatile | Notifications.TwoPhaseCommit;
     base.enlistment.ProtocolProviderContext = this;
     base.stateMachine = new SubordinateStateMachine(this);
     base.stateMachine.ChangeState(state.States.SubordinateInitializing);
 }
        public ParticipantEnlistment(ProtocolState state, WsatRegistrationHeader header, Microsoft.Transactions.Wsat.Messaging.ControlProtocol protocol, TwoPhaseCommitParticipantProxy proxy) : base(state)
        {
            this.protocol = protocol;
            proxy.AddRef();
            this.participantProxy = proxy;
            this.ConfigureEnlistment(header);
            this.CreateCoordinatorService();
            switch (protocol)
            {
            case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC:
                base.stateMachine = new VolatileStateMachine(this);
                base.stateMachine.ChangeState(state.States.VolatileRegistering);
                return;

            case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC:
                base.stateMachine = new DurableStateMachine(this);
                base.stateMachine.ChangeState(state.States.DurableRegistering);
                return;
            }
            Microsoft.Transactions.Bridge.DiagnosticUtility.FailFast("Invalid protocol");
        }
 public ParticipantEnlistment(ProtocolState state, Enlistment enlistment, Guid enlistmentId, EndpointAddress service) : base(state, enlistmentId)
 {
     base.enlistment = enlistment;
     base.enlistment.ProtocolProviderContext = this;
     this.protocol         = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC;
     base.stateMachine     = new DurableStateMachine(this);
     this.participantProxy = state.TryCreateTwoPhaseCommitParticipantProxy(service);
     if (this.participantProxy == null)
     {
         if (RecoveredParticipantInvalidMetadataRecord.ShouldTrace)
         {
             RecoveredParticipantInvalidMetadataRecord.Trace(base.enlistmentId, enlistment.RemoteTransactionId, service, base.state.ProtocolVersion);
         }
         base.stateMachine.ChangeState(state.States.DurableFailedRecovery);
     }
     else
     {
         base.stateMachine.ChangeState(state.States.DurableRecovering);
     }
     base.AddToLookupTable();
 }
        public ParticipantEnlistment(ProtocolState state, WsatRegistrationHeader header, Microsoft.Transactions.Wsat.Messaging.ControlProtocol protocol, TwoPhaseCommitParticipantProxy proxy) : base(state)
        {
            this.protocol = protocol;
            proxy.AddRef();
            this.participantProxy = proxy;
            this.ConfigureEnlistment(header);
            this.CreateCoordinatorService();
            switch (protocol)
            {
                case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC:
                    base.stateMachine = new VolatileStateMachine(this);
                    base.stateMachine.ChangeState(state.States.VolatileRegistering);
                    return;

                case Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC:
                    base.stateMachine = new DurableStateMachine(this);
                    base.stateMachine.ChangeState(state.States.DurableRegistering);
                    return;
            }
            Microsoft.Transactions.Bridge.DiagnosticUtility.FailFast("Invalid protocol");
        }
 public ParticipantEnlistment(ProtocolState state, Enlistment enlistment, Guid enlistmentId, EndpointAddress service) : base(state, enlistmentId)
 {
     base.enlistment = enlistment;
     base.enlistment.ProtocolProviderContext = this;
     this.protocol = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC;
     base.stateMachine = new DurableStateMachine(this);
     this.participantProxy = state.TryCreateTwoPhaseCommitParticipantProxy(service);
     if (this.participantProxy == null)
     {
         if (RecoveredParticipantInvalidMetadataRecord.ShouldTrace)
         {
             RecoveredParticipantInvalidMetadataRecord.Trace(base.enlistmentId, enlistment.RemoteTransactionId, service, base.state.ProtocolVersion);
         }
         base.stateMachine.ChangeState(state.States.DurableFailedRecovery);
     }
     else
     {
         base.stateMachine.ChangeState(state.States.DurableRecovering);
     }
     base.AddToLookupTable();
 }