public void QueueInvocableWithPayload <T, TParams>(TParams payload) where T : IInvocable, IInvocableWithPayload <TParams> { this.EnqueueInvocable <T>(invocable => { IInvocableWithPayload <TParams> invocableWithParams = (IInvocableWithPayload <TParams>)invocable; invocableWithParams.Payload = payload; }); }
public Guid QueueInvocableWithPayload <T, TParams>(TParams payload) where T : IInvocable, IInvocableWithPayload <TParams> { var job = this.EnqueueInvocable <T>(invocable => { IInvocableWithPayload <TParams> invocableWithParams = (IInvocableWithPayload <TParams>)invocable; invocableWithParams.Payload = payload; }); return(job.Guid); }