コード例 #1
0
		[U] public async Task Urls()
		{
			var id = new TaskId("fakeid:1");

			await UrlTester.GET($"/_tasks/fakeid%3A1")
				.Fluent(c => c.GetTask(id))
				.Request(c => c.GetTask(new GetTaskRequest(id)))
				.FluentAsync(c => c.GetTaskAsync(id))
				.RequestAsync(c => c.GetTaskAsync(new GetTaskRequest(id)))
				;
		}
コード例 #2
0
 public ReindexRethrottleDescriptor TaskId(TaskId id)
 {
     this.RequestState.RouteValues.Required("task_id", id);
     return(this);
 }
コード例 #3
0
 /// <summary>
 /// Rethrottle an existing reindex or update by query task
 /// </summary>
 public Task <ReindexRethrottleResponse> RethrottleAsync(TaskId id,
                                                         Func <ReindexRethrottleDescriptor, IReindexRethrottleRequest> selector = null,
                                                         CancellationToken ct = default
                                                         ) =>
 RethrottleAsync(selector.InvokeOrDefault(new ReindexRethrottleDescriptor(id)), ct);
コード例 #4
0
 /// <summary>
 /// Rethrottle an existing reindex or update by query task
 /// </summary>
 public ReindexRethrottleResponse Rethrottle(TaskId id, Func <ReindexRethrottleDescriptor, IReindexRethrottleRequest> selector = null) =>
 Rethrottle(selector.InvokeOrDefault(new ReindexRethrottleDescriptor(id)));
コード例 #5
0
 public static GetTaskResponse GetTask(this IElasticClient client, TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null)
 => client.Tasks.GetTask(id, selector);
コード例 #6
0
 public static Task <GetTaskResponse> GetTaskAsync(this IElasticClient client,
                                                   TaskId id,
                                                   Func <GetTaskDescriptor, IGetTaskRequest> selector = null,
                                                   CancellationToken ct = default
                                                   )
 => client.Tasks.GetTaskAsync(id, selector, ct);
コード例 #7
0
 ///<summary>/_tasks/{task_id}</summary>
 ///<param name = "taskId">this parameter is required</param>
 public GetTaskDescriptor(TaskId taskId) : base(r => r.Required("task_id", taskId))
 {
 }
コード例 #8
0
 /// <inheritdoc />
 public Task <ListTasksResponse> DeleteByQueryRethrottleAsync(
     TaskId taskId,
     Func <DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null,
     CancellationToken ct = default
     ) => DeleteByQueryRethrottleAsync(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId)), ct);
コード例 #9
0
 ///<summary>/_tasks/{task_id}/_cancel</summary>
 ///<param name = "taskId">Optional, accepts null</param>
 public CancelTasksDescriptor(TaskId taskId) : base(r => r.Optional("task_id", taskId))
 {
 }
コード例 #10
0
 ///<summary>/_tasks/{task_id}/_cancel</summary>
 ///<param name = "taskId">Optional, accepts null</param>
 public CancelTasksRequest(TaskId taskId) : base(r => r.Optional("task_id", taskId))
 {
 }
コード例 #11
0
 public GetTaskDescriptor TaskId(TaskId taskId) => this.Assign(a => a.RouteValues.Required("task_id", taskId));
コード例 #12
0
 public Task <IGetTaskResponse> GetTaskAsync(TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null,
                                             CancellationToken cancellationToken = default(CancellationToken)
                                             ) =>
 GetTaskAsync(selector.InvokeOrDefault(new GetTaskDescriptor(id)), cancellationToken);
コード例 #13
0
 public IGetTaskResponse GetTask(TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null) =>
 GetTask(selector.InvokeOrDefault(new GetTaskDescriptor(id)));
コード例 #14
0
		public IGetTaskResponse GetTask(TaskId id, Func<GetTaskDescriptor, IGetTaskRequest> selector = null) =>
			this.GetTask(selector.InvokeOrDefault(new GetTaskDescriptor().TaskId(id)));
コード例 #15
0
 ///<summary>Cancel the task with specified task id (node_id:task_number)</summary>
 public CancelTasksDescriptor TaskId(TaskId taskId) => Assign(taskId, (a, v) => a.RouteValues.Optional("task_id", v));
コード例 #16
0
		public Task<IGetTaskResponse> GetTaskAsync(TaskId id, Func<GetTaskDescriptor, IGetTaskRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken)) =>
			this.GetTaskAsync(selector.InvokeOrDefault(new GetTaskDescriptor().TaskId(id)), cancellationToken);
コード例 #17
0
 /// <inheritdoc />
 public ListTasksResponse DeleteByQueryRethrottle(
     TaskId taskId,
     Func <DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null
     ) => DeleteByQueryRethrottle(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId)));