Exemplo n.º 1
0
        public Task <string> Method()
        {
            var stateMachine = new MethodStateMachine
            {
                // Represents a builder for asynchronous methods that return a task
                // and provides a parameter for the result.
                builder = AsyncTaskMethodBuilder <string> .Create(),

                state = -1
            };

            stateMachine.builder.Start(ref stateMachine);
            return(stateMachine.builder.Task);
        }
Exemplo n.º 2
0
 public bool Resolve(MethodStateMachine methodSM)
 {
     //Pop away finished method
     _callStack.Pop();
     return(false);
 }