예제 #1
0
        public IYieldPoint StartFlow(StartData startData)
        {
            nonPersistentState = true;
            RequestStartTime   = startData.RequestStartTime;

            return(flowProvider.YieldWithRequestSync <QuoteRequestMessage, QuoteResponseMessage>(
                       new QuoteRequestMessage
            {
                Amount = startData.Amount
            },
                       HandleQuoteResponse));
        }
예제 #2
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());
        }
예제 #3
0
        public IYieldPoint StartFlow(PingMessage message)
        {
            Console.WriteLine("PingMessage received, calling flowProvider.End() directly");

            if (DateTime.Now < new DateTime(2000, 1, 1))
            {
                //never true
                return(flowProvider
                       .YieldWithRequestSync <PingConfirmationRequestMessage, PingConfirmationResponseMessage>
                           (new PingConfirmationRequestMessage()
                {
                    StoredInState = "Ping:"
                },
                           HandlePingConfirmationResponse));
            }

            return(Finish());
        }