コード例 #1
0
 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;
     });
 }
コード例 #2
0
ファイル: Queue.cs プロジェクト: weiplanet/coravel
        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);
        }