/// <summary> /// Sends a POST to '/api/backgroundtasks' /// </summary> /// <param name="dto">a body parameter (no description)</param> /// <returns></returns> public static RestOperation StartBackgroundTask(CreateBackgroundTask dto) { return new RestOperation("POST", "api/backgroundtasks") { Content = dto }; }
partial void CopyExtraPropertiesToClone(CreateBackgroundTask clone, bool includeLocalProperties);
/// <summary> /// Sends a POST to '/api/backgroundtasks' (asynchronous) /// </summary> /// <param name="dto">a body parameter (no description)</param> /// <returns></returns> public virtual async Task<BackgroundTask> StartBackgroundTaskAsync(CreateBackgroundTask dto) { var operation = Operations.StartBackgroundTask(dto); var response = await _client.SendAsync(operation.BuildRequest(_client)); EnsureSuccess(response); var result = await response.Content.ReadAsAsync<BackgroundTask>(); return result; }
public CreateBackgroundTask Clone(bool includeLocalProperties) { var c = new CreateBackgroundTask { Parameters = Parameters, StreamProgress = StreamProgress, Type = Type, }; CopyExtraPropertiesToClone(c, includeLocalProperties); return c; }
/// <summary> /// Sends a POST to '/api/backgroundtasks' /// </summary> /// <param name="dto">a body parameter (no description)</param> /// <returns></returns> public virtual BackgroundTask StartBackgroundTask(CreateBackgroundTask dto) { var operation = Operations.StartBackgroundTask(dto); var response = _client.SendAsync(operation.BuildRequest(_client)).Result; EnsureSuccess(response); var result = response.Content.ReadAsAsync<BackgroundTask>().Result; return result; }