public ScriptControlAdapter(
            Log contextLog, Task contextTask, Job contextJob, Spooler contextSpooler, string scriptContent,
            string language)
            : base(contextLog, contextTask, contextJob, contextSpooler, scriptContent)
        {
            this.spoolerParams = new SpoolerParams(this.spooler_task, this.spooler, this.IsOrderJob, false);

            var scriptType = Type.GetTypeFromCLSID(Guid.Parse("0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC"));
            this.scriptControl = Activator.CreateInstance(scriptType, false);
            this.scriptControl.Language = language;

            this.scriptControl.AddObject("spooler_log", this.spooler_log, false);
            this.scriptControl.AddObject("spooler_task", this.spooler_task, false);
            this.scriptControl.AddObject("spooler_job", this.spooler_job, false);
            this.scriptControl.AddObject("spooler", this.spooler, false);
            this.scriptControl.AddObject("spooler_params", this.spoolerParams, false);
        }
Beispiel #2
0
        public ScriptControlAdapter(
            Log contextLog, Task contextTask, Job contextJob, Spooler contextSpooler, string contextStdErrLogLevel, string scriptContent,
            string language)
            : base(contextLog, contextTask, contextJob, contextSpooler, contextStdErrLogLevel, scriptContent)
        {
            spoolerParams = new SpoolerParams(spooler_task, spooler, IsOrderJob, false);

            var scriptType = Type.GetTypeFromCLSID(Guid.Parse("0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC"));

            this.scriptControl          = Activator.CreateInstance(scriptType, false);
            this.scriptControl.Language = language;

            this.scriptControl.AddObject("spooler_log", spooler_log, false);
            this.scriptControl.AddObject("spooler_task", spooler_task, false);
            this.scriptControl.AddObject("spooler_job", spooler_job, false);
            this.scriptControl.AddObject("spooler", spooler, false);
            this.scriptControl.AddObject("spooler_params", spoolerParams, false);
        }