private bool TrySchedule(Envelope envelope, HandlerDescriptor handler, ArgumentDescriptor argument) { if (schedulingProvider.IsLaterExecutionRequired(envelope)) { ScheduleCommandContext context = new ScheduleCommandContext(handler, argument, envelope, OnScheduledCommand); schedulingProvider.Schedule(context); return(true); } return(false); }
private bool TrySchedule(Envelope envelope, object handlerContext, IEnumerable <HandlerDescriptor> handlers, ArgumentDescriptor argument) { if (schedulingProvider.IsLaterExecutionRequired(envelope)) { ScheduleEventContext context = new ScheduleEventContext(handlers, argument, envelope, handlerContext, OnScheduledEvent); schedulingProvider.Schedule(context); return(true); } return(false); }