public override void Enter(StateMachine stateMachine)
 {
     ParticipantEnlistment participant = (ParticipantEnlistment) stateMachine.Enlistment;
     participant.CreateCoordinatorService();
     base.state.TwoPhaseCommitCoordinator.SendCommit(participant);
     stateMachine.ChangeState(base.state.States.DurableCommitting);
 }
 public override void Leave(StateMachine stateMachine)
 {
     base.Leave(stateMachine);
     long num = Microsoft.Transactions.Wsat.StateMachines.State.QueryStopTime() - ((ParticipantEnlistment) stateMachine.Enlistment).LastMessageTime;
     base.state.Perf.AverageParticipantCommitResponseTimeBase.Increment();
     base.state.Perf.AverageParticipantCommitResponseTime.IncrementBy(num);
     stateMachine.CancelTimer();
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     if (ParticipantStateMachineFinishedRecord.ShouldTrace)
     {
         ParticipantStateMachineFinishedRecord.Trace(stateMachine.Enlistment.EnlistmentId, stateMachine.Enlistment.Enlistment.RemoteTransactionId, TransactionOutcome.Committed);
     }
 }
 public override void Execute(StateMachine stateMachine)
 {
     if (DebugTrace.Info)
     {
         base.state.DebugTraceSink.OnEvent(this);
     }
     stateMachine.State.OnEvent(this);
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     if (CoordinatorStateMachineFinishedRecord.ShouldTrace)
     {
         CoordinatorStateMachineFinishedRecord.Trace(stateMachine.Enlistment.EnlistmentId, stateMachine.Enlistment.Enlistment.RemoteTransactionId, TransactionOutcome.InDoubt);
     }
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     CoordinatorEnlistment coordinator = (CoordinatorEnlistment) stateMachine.Enlistment;
     coordinator.CreateParticipantService();
     base.state.TwoPhaseCommitParticipant.SendRecoverMessage(coordinator);
     stateMachine.StartTimer(TimerProfile.Replaying);
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     CoordinatorEnlistment enlistment = (CoordinatorEnlistment) stateMachine.Enlistment;
     if (enlistment.RegisterVolatileCoordinator == null)
     {
         DiagnosticUtility.FailFast("CoordinatorRegisteringVolatile requires RegisterVolatileCoordinator");
     }
 }
 public override void Leave(StateMachine stateMachine)
 {
     base.Leave(stateMachine);
     ParticipantEnlistment enlistment = (ParticipantEnlistment) stateMachine.Enlistment;
     long num = Microsoft.Transactions.Wsat.StateMachines.State.QueryStopTime() - enlistment.LastMessageTime;
     base.state.Perf.AverageParticipantPrepareResponseTimeBase.Increment();
     base.state.Perf.AverageParticipantPrepareResponseTime.IncrementBy(num);
     enlistment.Retries = 0;
     stateMachine.CancelTimer();
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     TransactionContextStateMachine machine = (TransactionContextStateMachine) stateMachine;
     TransactionContextManager contextManager = machine.ContextManager;
     foreach (TransactionContextEnlistTransactionEvent event2 in contextManager.Requests)
     {
         base.state.ActivationCoordinator.SendCreateCoordinationContextResponse(contextManager.TransactionContext, event2.Result);
     }
     contextManager.Requests.Clear();
 }
 public override void Execute(StateMachine stateMachine)
 {
     try
     {
         if (DebugTrace.Info)
         {
             base.state.DebugTraceSink.OnEvent(this);
         }
         stateMachine.State.OnEvent(this);
     }
     finally
     {
         base.Proxy.Release();
     }
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     CoordinatorEnlistment coordinator = (CoordinatorEnlistment) stateMachine.Enlistment;
     if (coordinator.RegisterVolatileCoordinator == null)
     {
         DiagnosticUtility.FailFast("CoordinatorVolatileActive requires RegisterVolatileCoordinator");
     }
     if (RegisterCoordinatorRecord.ShouldTrace)
     {
         RegisterCoordinatorRecord.Trace(coordinator.EnlistmentId, coordinator.SuperiorContext, ControlProtocol.Volatile2PC, coordinator.RegisterVolatileCoordinator.CoordinatorProxy.To, base.state.ProtocolVersion);
     }
     TmEnlistPrePrepareEvent enlistPrePrepareEvent = coordinator.EnlistPrePrepareEvent;
     coordinator.EnlistPrePrepareEvent = null;
     coordinator.SetCallback(enlistPrePrepareEvent.Callback, enlistPrePrepareEvent.CallbackState);
     base.state.TransactionManagerSend.EnlistPrePrepareResponse(coordinator, Status.Success);
 }
 public override void Enter(StateMachine stateMachine)
 {
     if (CoordinatorStateMachineFinishedRecord.ShouldTrace)
     {
         CoordinatorStateMachineFinishedRecord.Trace(stateMachine.Enlistment.EnlistmentId, stateMachine.Enlistment.Enlistment.RemoteTransactionId, TransactionOutcome.Aborted);
     }
     CoordinatorEnlistment coordinator = (CoordinatorEnlistment) stateMachine.Enlistment;
     base.TrySendAborted(coordinator);
     if (coordinator.RegisterVolatileCoordinator != null)
     {
         base.TrySendAborted(coordinator.RegisterVolatileCoordinator);
     }
     if (coordinator.PreparingVolatileCoordinator != null)
     {
         base.TrySendAborted(coordinator.PreparingVolatileCoordinator);
     }
     base.Enter(stateMachine);
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     stateMachine.StartTimer(TimerProfile.Prepared);
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     CoordinatorEnlistment coordinator = (CoordinatorEnlistment) stateMachine.Enlistment;
     base.state.RegistrationParticipant.SendDurableRegister(coordinator);
 }
 public SynchronizationManager(StateMachine stateMachine)
 {
     this.stateMachine = stateMachine;
 }
 public override void Execute(StateMachine stateMachine)
 {
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
 }
 public virtual void Enter(StateMachine stateMachine)
 {
 }
 public virtual void Leave(StateMachine stateMachine)
 {
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     stateMachine.Cleanup();
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     stateMachine.StartTimer(TimerProfile.VolatileOutcomeAssurance);
 }
 public override void Enter(StateMachine stateMachine)
 {
     base.Enter(stateMachine);
     ((ParticipantEnlistment) stateMachine.Enlistment).LastMessageTime = Microsoft.Transactions.Wsat.StateMachines.State.QueryStartTime();
     stateMachine.StartTimer(TimerProfile.Preparing);
 }
 public override void Leave(StateMachine stateMachine)
 {
     base.Leave(stateMachine);
     stateMachine.CancelTimer();
 }