Aditi.Scheduler.ScheduledTasks.DeleteTaskAsync C# (CSharp) Method

DeleteTaskAsync() public method

public DeleteTaskAsync ( System.Guid taskId ) : Task
taskId System.Guid
return Task
        public async Task<Guid> DeleteTaskAsync(Guid taskId)
        {
            var client = new HttpClient();

            client.DefaultRequestHeaders.Add(
                "Authorization",
                new Signature(this._subscriptionId, this._secretKey).ToString());

            var response = client.DeleteAsync(_uri + taskId.ToString()).Result;

            if (response.StatusCode == HttpStatusCode.Accepted)
                return GetOperationId(response);

            if (response.StatusCode == HttpStatusCode.BadRequest)
            {
                //check for model state errors
                string responseMessage = await response.Content.ReadAsStringAsync();
                throw CreateSchedulerException(responseMessage);
            }

            //TODO Is there any scenario code block will reach this?
            return Guid.Empty;
        }