Beispiel #1
0
        public Task <HttpResponseMessage> InvokeCMD_Async(string script, JToken argumentsFromBody, CancellationToken cancellationToken)
        {
            string physicalFullPath         = script.LocalFullPath();
            CmdArgumentResolver argResolver = new CmdArgumentResolver(Path.GetExtension(physicalFullPath));
            string redirectStandardInput    = argumentsFromBody.DistinguishStandardInput();
            string allArguments             = argResolver.GatherInputArguments(this.Request, (redirectStandardInput == null) ? argumentsFromBody : null, ConfigHelper.CmdForceArgumentQuote);

            return(this.InvokeCmdAsync(physicalFullPath, allArguments, redirectStandardInput, cancellationToken));
        }
Beispiel #2
0
        public HttpResponseMessage InvokeCMD(string script, JToken argumentsFromBody)
        {
            string physicalFullPath         = script.LocalFullPath();
            CmdArgumentResolver argResolver = new CmdArgumentResolver(Path.GetExtension(physicalFullPath));
            string redirectStandardInput    = argumentsFromBody.DistinguishStandardInput();
            string allArguments             = argResolver.GatherInputArguments(this.Request, (redirectStandardInput == null) ? argumentsFromBody : null, ConfigHelper.CmdForceArgumentQuote);

            return(this.InvokeCmd(physicalFullPath, allArguments, redirectStandardInput, ConfigHelper.CmdTimeoutSeconds));
        }