public override void Enter(StateMachine stateMachine) { base.Enter(stateMachine); if (RegisterParticipantRecord.ShouldTrace) { CompletionEnlistment enlistment = (CompletionEnlistment)stateMachine.Enlistment; RegisterParticipantRecord.Trace(enlistment.EnlistmentId, enlistment.Enlistment.RemoteTransactionId, ControlProtocol.Completion, enlistment.ParticipantProxy.To, base.state.ProtocolVersion); } }
protected void ProcessTmRegisterResponse(TmRegisterResponseEvent e) { ParticipantEnlistment participant = e.Participant; MsgRegisterEvent sourceEvent = e.SourceEvent; if (e.Status != Status.Success) { Fault fault = this.state.Faults.ParticipantTMRegistrationFailed(e.Status); this.state.RegistrationCoordinator.SendFault(sourceEvent.Result, fault); if (RegisterParticipantFailureRecord.ShouldTrace) { RegisterParticipantFailureRecord.Trace(participant.EnlistmentId, participant.Enlistment.RemoteTransactionId, participant.ControlProtocol, participant.ParticipantProxy.To, Microsoft.Transactions.SR.GetString("PplCreateSubordinateEnlistmentFailed", new object[] { e.Status.ToString() }), this.state.ProtocolVersion); } } else { participant.OnParticipantRegistered(); this.state.RegistrationCoordinator.SendRegisterResponse(participant, sourceEvent.Result, sourceEvent.Protocol, participant.CoordinatorService); if (RegisterParticipantRecord.ShouldTrace) { RegisterParticipantRecord.Trace(participant.EnlistmentId, participant.Enlistment.RemoteTransactionId, participant.ControlProtocol, participant.ParticipantProxy.To, this.state.ProtocolVersion); } } }