public ContainerParentJob(string command, string name, JobIdentifier jobId, string jobType) : base(command, name, jobId) { this._moreData = true; this._tracer = PowerShellTraceSourceFactory.GetTraceSource(); this._executionError = new PSDataCollection<ErrorRecord>(); base.PSJobTypeName = jobType; }
protected Job(string command, string name, JobIdentifier token) { this.stateInfo = new System.Management.Automation.JobStateInfo(JobState.NotStarted); this.finished = new ManualResetEvent(false); this.guid = Guid.NewGuid(); this.syncObject = new object(); this.results = new PSDataCollection <PSStreamObject>(); this.resultsOwner = true; this.error = new PSDataCollection <ErrorRecord>(); this.errorOwner = true; this.progress = new PSDataCollection <ProgressRecord>(); this.progressOwner = true; this.verbose = new PSDataCollection <VerboseRecord>(); this.verboseOwner = true; this.warning = new PSDataCollection <WarningRecord>(); this.warningOwner = true; this.debug = new PSDataCollection <DebugRecord>(); this.debugOwner = true; this.output = new PSDataCollection <PSObject>(); this.outputOwner = true; this._beginTime = null; this._endTime = null; this._jobTypeName = string.Empty; if (token == null) { throw PSTraceSource.NewArgumentNullException("token", "remotingerroridstrings", "JobIdentifierNull", new object[0]); } if (token.Id > _jobIdSeed) { throw PSTraceSource.NewArgumentException("token", "remotingerroridstrings", "JobIdNotYetAssigned", new object[] { token.Id }); } this.command = command; this.sessionId = token.Id; this.guid = token.InstanceId; if (!string.IsNullOrEmpty(name)) { this.name = name; } else { this.name = this.AutoGenerateJobName(); } }
/// <summary> /// Create a container parent job with the /// specified command string /// </summary> /// <param name="command">Command string</param> /// <param name="name">Friendly name for the job</param> /// <param name="jobId">JobIdentifier token that allows reuse of an Id and Instance Id</param> /// <param name="jobType">Job type name</param> public ContainerParentJob(string command, string name, JobIdentifier jobId, string jobType) : base(command, name, jobId) { PSJobTypeName = jobType; StateChanged += HandleMyStateChanged; }
/// <summary> /// /// </summary> /// <param name="runtime"></param> /// <param name="command"></param> /// <param name="name"></param> /// <param name="token"></param> internal PSWorkflowJob(PSWorkflowRuntime runtime, string command, string name, JobIdentifier token) : base(command, name, token) { Dbg.Assert(runtime != null, "runtime must not be null."); _runtime = runtime; CommonInit(); }
/// <summary> /// Create a container parent job with the /// specified command string /// </summary> /// <param name="command">Command string</param> /// <param name="name">Friendly name for the job</param> /// <param name="jobId">JobIdentifier token that allows reuse of an Id and Instance Id</param> public ContainerParentJob(string command, string name, JobIdentifier jobId) : base(command, name, jobId) { StateChanged += HandleMyStateChanged; }
/// <summary> /// Creates an instance of this class /// </summary> /// <param name="command">Command invoked by this job object</param> /// <param name="name">Friendly name for the job object</param> /// <param name="token">JobIdentifier token used to assign Id and InstanceId</param> protected Job2(string command, string name, JobIdentifier token) : base(command, name, token) { }
protected Job2(string command, string name, JobIdentifier token) : base(command, name, token) { this._syncobject = new object(); this._tracer = PowerShellTraceSourceFactory.GetTraceSource(); }
internal PSWorkflowJob(PSWorkflowRuntime runtime, string command, string name, JobIdentifier token) : base(command, name, token) { this._tracer = PowerShellTraceSourceFactory.GetTraceSource(); this._syncObject = new object(); this._resumeErrorSyncObject = new object(); this._statusMessage = string.Empty; this._location = string.Empty; this._resumeErrors = new Dictionary<Guid, Exception>(); this._workflowParameters = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); this._psWorkflowCommonParameters = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); this._jobMetadata = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); this._privateMetadata = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); this.IsSuspendable = null; this.listOfLabels = new List<string>(); this._runtime = runtime; this.CommonInit(); }