Esempio n. 1
0
        public override async Task ExecuteAsync(IOperationExecutionContext context)
        {
            using var scriptReader = SHUtil.OpenScriptAsset(this.ScriptName, this, context);
            if (scriptReader == null)
            {
                return;
            }

            this.ExitCode = await SHUtil.ExecuteScriptAsync(context, scriptReader, this.Arguments, this, this.Verbose, this.OutputLevel, this.ErrorLevel).ConfigureAwait(false);
        }
Esempio n. 2
0
 private TextReader OpenConfigureScript(IOperationExecutionContext context)
 {
     if (!string.IsNullOrWhiteSpace(this.ConfigureScriptAsset))
     {
         return(SHUtil.OpenScriptAsset(this.ConfigureScriptAsset, this, context));
     }
     else
     {
         return(new StringReader(this.ConfigureScript));
     }
 }