internal TaskCounts(Models.TaskCounts protocolObject) { this.Active = protocolObject.Active; this.Completed = protocolObject.Completed; this.Failed = protocolObject.Failed; this.Running = protocolObject.Running; this.Succeeded = protocolObject.Succeeded; }
/// <summary> /// Builds a TaskCountsGetResponse object /// </summary> public static AzureOperationResponse <ProxyModels.TaskCounts, ProxyModels.JobGetTaskCountsHeaders> CreateTaskCountsGetResponse( int active, int running, int succeeded, int failed) { var response = new AzureOperationResponse <ProxyModels.TaskCounts, ProxyModels.JobGetTaskCountsHeaders>(); response.Response = new HttpResponseMessage(HttpStatusCode.OK); ProxyModels.TaskCounts taskCounts = new ProxyModels.TaskCounts(); taskCounts.Active = active; taskCounts.Running = running; taskCounts.Succeeded = succeeded; taskCounts.Failed = failed; taskCounts.Completed = succeeded + failed; response.Body = taskCounts; return(response); }
/// <summary> /// Initializes a new instance of the TaskCountsResult class. /// </summary> /// <param name="taskCounts">The number of Tasks per state.</param> /// <param name="taskSlotCounts">The number of TaskSlots required by /// Tasks per state.</param> public TaskCountsResult(TaskCounts taskCounts, TaskSlotCounts taskSlotCounts) { TaskCounts = taskCounts; TaskSlotCounts = taskSlotCounts; CustomInit(); }