Beispiel #1
0
        public object Consume(DirectionRequest request)
        {
            switch (request.Direction)
            {
            case "North":
                return(new GoNorth());

            case "South":
                return(new GoSouth());
            }

            // This does nothing
            return(null);
        }
Beispiel #2
0
 public ScheduledResponse Consume(DirectionRequest request)
 {
     // Process GoWest in 5 minutes from now
     return(new ScheduledResponse(new GoWest(), TimeSpan.FromMinutes(5)));
 }