示例#1
0
 internal static IO <Task <TrafficLightState> > GreenState
     () =>
 from _ in TraceHelper.Log(nameof(GreenState))
 select(from __ in Task.Delay(TimeSpan.FromSeconds(3))
        select new TrafficLightState(YellowState));
示例#2
0
 internal static IO <Task <TrafficLightState> > RedState
     () =>
 from _ in TraceHelper.Log(nameof(RedState))
 select(from __ in Task.Delay(TimeSpan.FromSeconds(2))
        select default(TrafficLightState));