public DynamicPsHost(DynamicPowerShell powershell)
            {
                this.instanceId = Guid.NewGuid();
                this.powerShell = powershell ?? throw new ArgumentNullException("powershell");
                this.ui         = new DynamicPsUserInterface(this);

                this.log = LoggerProxy.Create(this.GetService <ILogger>(false), "Powershell");
            }             // ctor
        public PowerShellCronItem(IServiceProvider sp, string name)
            : base(sp, name)
        {
            this.powerShell = new DynamicPowerShell(this);

            powerShell.Progress += PowerShell_Progress;
            powerShell.ProgressCompleted += PowerShell_ProgressCompleted;

            activityProperty = new SimpleConfigItemProperty<string>(this, "tw_cron_psactivity", "1. Activity", ActivityCategory, "Current task in the script.", null, null);
            statusDescriptionProperty = new SimpleConfigItemProperty<string>(this, "tw_cron_psstatus", "2. Status Description", ActivityCategory, "Current status description.", null, null);
            progressProperty = new SimpleConfigItemProperty<string>(this, "tw_cron_psprogres", "3. Progress", ActivityCategory, "Current progress of the current operation.", null, null);
            currentOperationProperty = new SimpleConfigItemProperty<string>(this, "tw_cron_psoperation", "4. Current Operation", ActivityCategory, "Current operation.", null, null);
        }
Exemple #3
0
        /// <summary></summary>
        /// <param name="sp"></param>
        /// <param name="name"></param>
        public PowerShellCronItem(IServiceProvider sp, string name)
            : base(sp, name)
        {
            this.powerShell = new DynamicPowerShell(this);

            powerShell.Progress          += PowerShell_Progress;
            powerShell.ProgressCompleted += PowerShell_ProgressCompleted;

            activityProperty          = new SimpleConfigItemProperty <string>(this, "tw_cron_psactivity", "1. Activity", ActivityCategory, "Current task in the script.", null, null);
            statusDescriptionProperty = new SimpleConfigItemProperty <string>(this, "tw_cron_psstatus", "2. Status Description", ActivityCategory, "Current status description.", null, null);
            progressProperty          = new SimpleConfigItemProperty <string>(this, "tw_cron_psprogres", "3. Progress", ActivityCategory, "Current progress of the current operation.", null, null);
            currentOperationProperty  = new SimpleConfigItemProperty <string>(this, "tw_cron_psoperation", "4. Current Operation", ActivityCategory, "Current operation.", null, null);
        }         // ctor
			public DynamicPsHost(DynamicPowerShell powershell)
			{
				if (powershell == null)
					throw new ArgumentNullException("powershell");

				this.instanceId = Guid.NewGuid();
				this.powerShell = powershell;
				this.ui = new DynamicPsUserInterface(this);

				this.log = LoggerProxy.Create(this.GetService<ILogger>(false), "Powershell");
			} // ctor