private void Start() { Receive <string>(s => { if (s == "offer") { Become(Offered); State = FsmActorState.Offered; } }); }
private void Offered() { Receive <string>(s => s == "accept", s => { Become(Accepted); State = FsmActorState.Accepted; }); Receive <string>(s => s == "reject", s => { Become(Start); State = FsmActorState.Start; }); }
public FsmBecomeActor() { State = FsmActorState.Start; Start(); }