internal JobStateInfo(JobStateInfo jobStateInfo) { using (JobStateInfo.tracer.TraceConstructor((object)this)) { this._state = jobStateInfo.State; this._reason = jobStateInfo.Reason; } }
internal static JobStateEventArgs RehydrateJobStateEventArgs(PSObject pso) { JobStateInfo jobStateInfo = RehydrateJobStateInfo(PSObject.AsPSObject(pso.Properties["JobStateInfo"].Value)); JobStateInfo previousJobStateInfo = null; PSPropertyInfo info3 = pso.Properties["PreviousJobStateInfo"]; if ((info3 != null) && (info3.Value != null)) { previousJobStateInfo = RehydrateJobStateInfo(PSObject.AsPSObject(info3.Value)); } return(new JobStateEventArgs(jobStateInfo, previousJobStateInfo)); }
public LongRunningTask(T command, string JobName, string Description) { Error = new PSDataCollection <ErrorRecord>(); Debug = new PSDataCollection <DebugRecord>(); Output = new PSDataCollection <PSObject>(); Progress = new PSDataCollection <ProgressRecord>(); Verbose = new PSDataCollection <VerboseRecord>(); Warning = new PSDataCollection <WarningRecord>(); statusMessage = null; joblocation = null; jobstate = null; Name = JobName; description = Description; SetState(JobState.NotStarted, null); SetStatus(Commands_RemoteApp.TemplateImageUploadPendingMessage); SetLocation("localhost"); cmdlet = command; }
public JobStateEventArgs(JobStateInfo jobStateInfo) { using (JobStateEventArgs.tracer.TraceConstructor((object)this)) this._jobStateInfo = jobStateInfo != null ? jobStateInfo : throw JobStateEventArgs.tracer.NewArgumentNullException(nameof(jobStateInfo)); }
internal void SetState(JobState state, Exception reason) { SetJobState(state); jobstate = new JobStateInfo(state, reason); }