Exemplo n.º 1
0
        private object ServerCommand(RestVerbs verbs, IParameterCollection parameters)
        {
            if (string.IsNullOrWhiteSpace(parameters["cmd"]))
            {
                return(RestMissingParam("cmd"));
            }

            TSRestPlayer tr = new TSRestPlayer(TPulse.Config);

            TPulse.Commands.HandleCommand(tr, parameters["cmd"]);
            return(RestResponse(string.Join("\n", tr.GetCommandOutput())));
        }
Exemplo n.º 2
0
        private object ServerCommand(RestVerbs verbs, IParameterCollection parameters)
        {
            if (string.IsNullOrWhiteSpace(parameters["cmd"]))
                return RestMissingParam("cmd");

            TSRestPlayer tr = new TSRestPlayer(TPulse.Config);
            TPulse.Commands.HandleCommand(tr, parameters["cmd"]);
            return RestResponse(string.Join("\n", tr.GetCommandOutput()));
        }