示例#1
0
 /// <summary>
 /// Initializes a new instance of the CloudJob class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Job within
 /// the Account.</param>
 /// <param name="displayName">The display name for the Job.</param>
 /// <param name="usesTaskDependencies">Whether Tasks in the Job can
 /// define dependencies on each other. The default is false.</param>
 /// <param name="url">The URL of the Job.</param>
 /// <param name="eTag">The ETag of the Job.</param>
 /// <param name="lastModified">The last modified time of the
 /// Job.</param>
 /// <param name="creationTime">The creation time of the Job.</param>
 /// <param name="state">The current state of the Job.</param>
 /// <param name="stateTransitionTime">The time at which the Job entered
 /// its current state.</param>
 /// <param name="previousState">The previous state of the Job.</param>
 /// <param name="previousStateTransitionTime">The time at which the Job
 /// entered its previous state.</param>
 /// <param name="priority">The priority of the Job.</param>
 /// <param name="maxParallelTasks">The maximum number of tasks that can
 /// be executed in parallel for the job.</param>
 /// <param name="constraints">The execution constraints for the
 /// Job.</param>
 /// <param name="jobManagerTask">Details of a Job Manager Task to be
 /// launched when the Job is started.</param>
 /// <param name="jobPreparationTask">The Job Preparation Task.</param>
 /// <param name="jobReleaseTask">The Job Release Task.</param>
 /// <param name="commonEnvironmentSettings">The list of common
 /// environment variable settings. These environment variables are set
 /// for all Tasks in the Job (including the Job Manager, Job
 /// Preparation and Job Release Tasks).</param>
 /// <param name="poolInfo">The Pool settings associated with the
 /// Job.</param>
 /// <param name="onAllTasksComplete">The action the Batch service
 /// should take when all Tasks in the Job are in the completed
 /// state.</param>
 /// <param name="onTaskFailure">The action the Batch service should
 /// take when any Task in the Job fails.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Job.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the Job as metadata.</param>
 /// <param name="executionInfo">The execution information for the
 /// Job.</param>
 /// <param name="stats">Resource usage statistics for the entire
 /// lifetime of the Job.</param>
 public CloudJob(string id = default(string), string displayName = default(string), bool?usesTaskDependencies = default(bool?), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), JobState?state = default(JobState?), System.DateTime?stateTransitionTime = default(System.DateTime?), JobState?previousState = default(JobState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), int?priority = default(int?), int?maxParallelTasks = default(int?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), IList <EnvironmentSetting> commonEnvironmentSettings = default(IList <EnvironmentSetting>), PoolInformation poolInfo = default(PoolInformation), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), JobNetworkConfiguration networkConfiguration = default(JobNetworkConfiguration), IList <MetadataItem> metadata = default(IList <MetadataItem>), JobExecutionInformation executionInfo = default(JobExecutionInformation), JobStatistics stats = default(JobStatistics))
 {
     Id                          = id;
     DisplayName                 = displayName;
     UsesTaskDependencies        = usesTaskDependencies;
     Url                         = url;
     ETag                        = eTag;
     LastModified                = lastModified;
     CreationTime                = creationTime;
     State                       = state;
     StateTransitionTime         = stateTransitionTime;
     PreviousState               = previousState;
     PreviousStateTransitionTime = previousStateTransitionTime;
     Priority                    = priority;
     MaxParallelTasks            = maxParallelTasks;
     Constraints                 = constraints;
     JobManagerTask              = jobManagerTask;
     JobPreparationTask          = jobPreparationTask;
     JobReleaseTask              = jobReleaseTask;
     CommonEnvironmentSettings   = commonEnvironmentSettings;
     PoolInfo                    = poolInfo;
     OnAllTasksComplete          = onAllTasksComplete;
     OnTaskFailure               = onTaskFailure;
     NetworkConfiguration        = networkConfiguration;
     Metadata                    = metadata;
     ExecutionInfo               = executionInfo;
     Stats                       = stats;
     CustomInit();
 }
示例#2
0
 internal JobExecutionInformation(Models.JobExecutionInformation protocolObject)
 {
     this.endTime         = protocolObject.EndTime;
     this.poolId          = protocolObject.PoolId;
     this.schedulingError = UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.SchedulingError, o => new JobSchedulingError(o).Freeze());
     this.startTime       = protocolObject.StartTime;
     this.terminateReason = protocolObject.TerminateReason;
 }