/// <summary>
 /// Initializes a new instance of the CloudTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Task within
 /// the Job.</param>
 /// <param name="displayName">A display name for the Task.</param>
 /// <param name="url">The URL of the Task.</param>
 /// <param name="eTag">The ETag of the Task.</param>
 /// <param name="lastModified">The last modified time of the
 /// Task.</param>
 /// <param name="creationTime">The creation time of the Task.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the Task completes.</param>
 /// <param name="state">The current state of the Task.</param>
 /// <param name="stateTransitionTime">The time at which the Task
 /// entered its current state.</param>
 /// <param name="previousState">The previous state of the Task.</param>
 /// <param name="previousStateTransitionTime">The time at which the
 /// Task entered its previous state.</param>
 /// <param name="commandLine">The command line of the Task.</param>
 /// <param name="containerSettings">The settings for the container
 /// under which the Task runs.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the Compute Node before running the command
 /// line.</param>
 /// <param name="outputFiles">A list of files that the Batch service
 /// will upload from the Compute Node after running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a Compute Node on which to start the new
 /// Task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this Task.</param>
 /// <param name="requiredSlots">The number of scheduling slots that the
 /// Task required to run.</param>
 /// <param name="userIdentity">The user identity under which the Task
 /// runs.</param>
 /// <param name="executionInfo">Information about the execution of the
 /// Task.</param>
 /// <param name="nodeInfo">Information about the Compute Node on which
 /// the Task ran.</param>
 /// <param name="multiInstanceSettings">An object that indicates that
 /// the Task is a multi-instance Task, and contains information about
 /// how to run the multi-instance Task.</param>
 /// <param name="stats">Resource usage statistics for the Task.</param>
 /// <param name="dependsOn">The Tasks that this Task depends
 /// on.</param>
 /// <param name="applicationPackageReferences">A list of Packages that
 /// the Batch service will deploy to the Compute Node before running
 /// the command line.</param>
 /// <param name="authenticationTokenSettings">The settings for an
 /// authentication token that the Task can use to perform Batch service
 /// operations.</param>
 public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState?state = default(TaskState?), System.DateTime?stateTransitionTime = default(System.DateTime?), TaskState?previousState = default(TaskState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), string commandLine = default(string), TaskContainerSettings containerSettings = default(TaskContainerSettings), IList <ResourceFile> resourceFiles = default(IList <ResourceFile>), IList <OutputFile> outputFiles = default(IList <OutputFile>), IList <EnvironmentSetting> environmentSettings = default(IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), int?requiredSlots = default(int?), UserIdentity userIdentity = default(UserIdentity), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), AuthenticationTokenSettings authenticationTokenSettings = default(AuthenticationTokenSettings))
 {
     Id                           = id;
     DisplayName                  = displayName;
     Url                          = url;
     ETag                         = eTag;
     LastModified                 = lastModified;
     CreationTime                 = creationTime;
     ExitConditions               = exitConditions;
     State                        = state;
     StateTransitionTime          = stateTransitionTime;
     PreviousState                = previousState;
     PreviousStateTransitionTime  = previousStateTransitionTime;
     CommandLine                  = commandLine;
     ContainerSettings            = containerSettings;
     ResourceFiles                = resourceFiles;
     OutputFiles                  = outputFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     RequiredSlots                = requiredSlots;
     UserIdentity                 = userIdentity;
     ExecutionInfo                = executionInfo;
     NodeInfo                     = nodeInfo;
     MultiInstanceSettings        = multiInstanceSettings;
     Stats                        = stats;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
     AuthenticationTokenSettings  = authenticationTokenSettings;
     CustomInit();
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the CloudTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the task within
 /// the job.</param>
 /// <param name="displayName">A display name for the task.</param>
 /// <param name="url">The URL of the task.</param>
 /// <param name="eTag">The ETag of the task.</param>
 /// <param name="lastModified">The last modified time of the
 /// task.</param>
 /// <param name="creationTime">The creation time of the task.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the task completes.</param>
 /// <param name="state">The current state of the task.</param>
 /// <param name="stateTransitionTime">The time at which the task
 /// entered its current state.</param>
 /// <param name="previousState">The previous state of the task.</param>
 /// <param name="previousStateTransitionTime">The time at which the
 /// task entered its previous state.</param>
 /// <param name="commandLine">The command line of the task.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a compute node on which to start the new
 /// task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this task.</param>
 /// <param name="runElevated">Whether to run the task in elevated
 /// mode.</param>
 /// <param name="executionInfo">Information about the execution of the
 /// task.</param>
 /// <param name="nodeInfo">Information about the compute node on which
 /// the task ran.</param>
 /// <param name="multiInstanceSettings">Information about how to run
 /// the multi-instance task.</param>
 /// <param name="stats">Resource usage statistics for the task.</param>
 /// <param name="dependsOn">Any dependencies this task has.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages that the Batch service will deploy to the compute node
 /// before running the command line.</param>
 public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState?state = default(TaskState?), System.DateTime?stateTransitionTime = default(System.DateTime?), TaskState?previousState = default(TaskState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), string commandLine = default(string), System.Collections.Generic.IList <ResourceFile> resourceFiles = default(System.Collections.Generic.IList <ResourceFile>), System.Collections.Generic.IList <EnvironmentSetting> environmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), bool?runElevated = default(bool?), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>))
 {
     Id                           = id;
     DisplayName                  = displayName;
     Url                          = url;
     ETag                         = eTag;
     LastModified                 = lastModified;
     CreationTime                 = creationTime;
     ExitConditions               = exitConditions;
     State                        = state;
     StateTransitionTime          = stateTransitionTime;
     PreviousState                = previousState;
     PreviousStateTransitionTime  = previousStateTransitionTime;
     CommandLine                  = commandLine;
     ResourceFiles                = resourceFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     RunElevated                  = runElevated;
     ExecutionInfo                = executionInfo;
     NodeInfo                     = nodeInfo;
     MultiInstanceSettings        = multiInstanceSettings;
     Stats                        = stats;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the TaskInformation class.
 /// </summary>
 /// <param name="taskState">The current state of the task.</param>
 /// <param name="taskUrl">The URL of the task.</param>
 /// <param name="jobId">The id of the job to which the task
 /// belongs.</param>
 /// <param name="taskId">The id of the task.</param>
 /// <param name="subtaskId">The id of the subtask if the task is a
 /// multi-instance task.</param>
 /// <param name="executionInfo">Information about the execution of the
 /// task.</param>
 public TaskInformation(TaskState taskState, string taskUrl = default(string), string jobId = default(string), string taskId = default(string), int?subtaskId = default(int?), TaskExecutionInformation executionInfo = default(TaskExecutionInformation))
 {
     TaskUrl       = taskUrl;
     JobId         = jobId;
     TaskId        = taskId;
     SubtaskId     = subtaskId;
     TaskState     = taskState;
     ExecutionInfo = executionInfo;
 }
 internal TaskExecutionInformation(Models.TaskExecutionInformation protocolObject)
 {
     this.endTime         = protocolObject.EndTime;
     this.exitCode        = protocolObject.ExitCode;
     this.lastRequeueTime = protocolObject.LastRequeueTime;
     this.lastRetryTime   = protocolObject.LastRetryTime;
     this.requeueCount    = protocolObject.RequeueCount;
     this.retryCount      = protocolObject.RetryCount;
     this.schedulingError = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new TaskSchedulingError(o).Freeze());
     this.startTime       = protocolObject.StartTime;
 }
Beispiel #5
0
 internal TaskExecutionInformation(Models.TaskExecutionInformation protocolObject)
 {
     this.ContainerInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerInfo, o => new TaskContainerExecutionInformation(o).Freeze());
     this.EndTime            = protocolObject.EndTime;
     this.ExitCode           = protocolObject.ExitCode;
     this.FailureInformation = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.FailureInfo, o => new TaskFailureInformation(o).Freeze());
     this.LastRequeueTime    = protocolObject.LastRequeueTime;
     this.LastRetryTime      = protocolObject.LastRetryTime;
     this.RequeueCount       = protocolObject.RequeueCount;
     this.Result             = UtilitiesInternal.MapNullableEnum <Models.TaskExecutionResult, Common.TaskExecutionResult>(protocolObject.Result);
     this.RetryCount         = protocolObject.RetryCount;
     this.StartTime          = protocolObject.StartTime;
 }