コード例 #1
0
 public TaskPayloadCollection(string codeName, IEnumerable<string> payloads, TaskOptions options = null)
 {
     foreach (string payload in payloads)
     {
         Tasks.Add(new TaskPayload(codeName, payload, options));
     }
 }
コード例 #2
0
 public TaskPayloadCollection(string codeName, IEnumerable <string> payloads, TaskOptions options = null)
 {
     foreach (string payload in payloads)
     {
         Tasks.Add(new TaskPayload(codeName, payload, options));
     }
 }
コード例 #3
0
ファイル: TaskPayload.cs プロジェクト: sunloverz/iron_dotnet
        public TaskPayload(string codeName, string payload, TaskOptions options = null)
        {
            CodeName = codeName;
            Payload = payload;

            if (options == null) return;

            Timeout = options.Timeout;
            Delay = options.Delay;
            Priority = options.Priority;
        }
コード例 #4
0
        public TaskPayload(string codeName, string payload, TaskOptions options = null)
        {
            CodeName = codeName;
            Payload  = payload;

            if (options == null)
            {
                return;
            }

            Timeout  = options.Timeout;
            Delay    = options.Delay;
            Priority = options.Priority;
        }
コード例 #5
0
 public async Task <TaskIdCollection> Create(string codeName, IEnumerable <string> payloads, TaskOptions options = null)
 {
     return(await Create(new TaskPayloadCollection(codeName, payloads, options)));
 }
コード例 #6
0
 public async Task <TaskIdCollection> Create(string codeName, IEnumerable <object> payloads, TaskOptions options = null)
 {
     return(await Create(codeName, payloads.Select(ValueSerializer.Generate), options));
 }
コード例 #7
0
 /// <summary>
 ///     Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public async Task <string> Create(string codeName, string payload, TaskOptions options = null)
 {
     return(await Create(new TaskPayload(codeName, payload, options)));
 }
コード例 #8
0
 /// <summary>
 ///     Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public async Task <string> Create(string codeName, object payload, TaskOptions options = null)
 {
     return(await Create(codeName, ValueSerializer.Generate(payload), options));
 }
コード例 #9
0
 public TaskPayloadCollection(string codeName, string payload, TaskOptions options = null)
 {
     Tasks.Add(new TaskPayload(codeName, payload, options));
 }
コード例 #10
0
 public TaskPayloadCollection(string codeName, string payload, TaskOptions options = null)
 {
     Tasks.Add(new TaskPayload(codeName, payload, options));
 }
コード例 #11
0
ファイル: TaskClient.cs プロジェクト: jaimeyzv/Booking
 /// <summary>
 /// Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public string Create(string codeName, string payload, TaskOptions options = null)
 {
     return(Create(new TaskPayload(codeName, payload, options)));
 }
コード例 #12
0
ファイル: TaskClient.cs プロジェクト: jaimeyzv/Booking
 /// <summary>
 /// Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public string Create(string codeName, object payload, TaskOptions options = null)
 {
     return(Create(codeName, ValueSerializer.Generate(payload), options));
 }
コード例 #13
0
ファイル: TaskClient.cs プロジェクト: sunloverz/iron_dotnet
 public TaskIdCollection Create(string codeName, IEnumerable<string> payloads, TaskOptions options = null)
 {
     return Create(new TaskPayloadCollection(codeName, payloads, options));
 }
コード例 #14
0
ファイル: TaskClient.cs プロジェクト: sunloverz/iron_dotnet
 public TaskIdCollection Create(string codeName, IEnumerable<object> payloads, TaskOptions options = null)
 {
     return Create(codeName, payloads.Select(ValueSerializer.Generate), options);
 }
コード例 #15
0
ファイル: TaskClient.cs プロジェクト: sunloverz/iron_dotnet
 /// <summary>
 /// Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public string Create(string codeName, string payload, TaskOptions options = null)
 {
     return Create(new TaskPayload(codeName, payload, options));
 }
コード例 #16
0
ファイル: TaskClient.cs プロジェクト: sunloverz/iron_dotnet
 /// <summary>
 /// Creates a single task
 /// </summary>
 /// <param name="codeName"> The task Code Name </param>
 /// <param name="payload"> The task payload </param>
 /// <param name="options"> The task options </param>
 /// <returns> The task id </returns>
 public string Create(string codeName, object payload, TaskOptions options = null)
 {
     return Create(codeName, ValueSerializer.Generate(payload), options);
 }