예제 #1
0
        public async Task <IYieldPoint> StartFlow(bool go)
        {
            Console.WriteLine("Phase = " + Phase + " Starting stand-alone flow");
            await Task.Delay(10);

            Phase = 1;

            if (go)
            {
                return(flowProvider.YieldWithRequestSync <PoloConfirmationRequestMessage, PoloConfirmationResponseMessage>
                           (new PoloConfirmationRequestMessage(),
                           HandlePoloConfirmationResponse));
            }

            Console.WriteLine("Phase = " + Phase + " Ending stand-alone flow prematurely");
            return(flowProvider.End());
        }
예제 #2
0
        public IYieldPoint HandleQuoteResponse2(QuoteResponseMessage message)
        {
            Console.WriteLine("[SimpleFlowController] Quote 2: " + message.Quote);

            exampleState.Done();

            return(flowProvider.End());
        }
예제 #3
0
        private IYieldPoint AllQuotesReceived()
        {
            Console.WriteLine("[ParallelFlowController] First quote: " + FirstQuote);
            Console.WriteLine("[ParallelFlowController] Second quote: " + SecondQuote);

            exampleState.Done();
            return(flowProvider.End());
        }
예제 #4
0
 private IYieldPoint Finish()
 {
     return(flowProvider.End());
 }