C# 클래스 YieldMachine.LampExample.Lamp

상속: StateMachine
파일 보기 프로젝트 열기: eteeselink/YieldMachine 1 사용 예제들

보호된 메소드들

메소드 설명
WalkStates ( ) : IEnumerable

A lamp state machine. Typical structure: protected override IEnumerable WalkStates() { [state name]: // State entry actions yield return null; // (wait for a trigger to be called) // State exit actions // Transitions from this state, by checking which trigger has been called if (Trigger == PressSwitch) goto [some other state]; // Throw an exception if the trigger was invalid InvalidState(); [some other state]: ... }

메소드 상세

WalkStates() 보호된 메소드

A lamp state machine. Typical structure: protected override IEnumerable WalkStates() { [state name]: // State entry actions yield return null; // (wait for a trigger to be called) // State exit actions // Transitions from this state, by checking which trigger has been called if (Trigger == PressSwitch) goto [some other state]; // Throw an exception if the trigger was invalid InvalidState(); [some other state]: ... }
protected WalkStates ( ) : IEnumerable
리턴 IEnumerable