private int SetState(Transaction.States newState) { int action = 0; if (State != newState) { if (newState == Transaction.States.Calling) { if (IsTransportUnreliable) action |= Transaction.Action.StartTimerA1; action |= Transaction.Action.StartTimerB; } else if (newState == Transaction.States.Completed) { if (IsTransportUnreliable) action |= Transaction.Action.StartTimerD; } State = newState; } return action; }
private void SetState(Transaction.States newState, ref int action) { if (State != newState) { if (newState == Transaction.States.Completed) action |= Transaction.Action.StartTimerJ; State = newState; } }
private int SetState(Transaction.States newState) { int action = 0; if (State != newState) { if (newState == Transaction.States.Completed) { action |= Transaction.Action.StartTimerH; if (IsTransportUnreliable) action |= Transaction.Action.StartTimerG1; } if (newState == Transaction.States.Confirmed) action |= Transaction.Action.StartTimerI; State = newState; } return action; }