Exemplo n.º 1
0
        // GET api/<controller>
        public IHttpActionResult Get([FromUri] string[] region, [FromUri] string[] o365service, string outputformat, bool complement = false)
        {
            int resultCount;
            var resultString = GenerationHelper.Generate(region, o365service, outputformat, complement, out resultCount);

            return(Json(new { count = resultCount, encodedResultString = WebUtility.HtmlEncode(resultString) }));
        }
Exemplo n.º 2
0
        public ActionResult Index(string[] region, string[] o365service, string outputformat, string command, bool complement = false)
        {
            int resultCount;
            var resultString   = GenerationHelper.Generate(region, o365service, outputformat, false, out resultCount);
            var outputFileName = "Results-UTC-" + DateTime.UtcNow + "-" + (region == null? "": string.Join("-", region)) + "-" + (o365service == null? "" : string.Join("-", o365service)) + ".txt";

            return(File(Encoding.UTF8.GetBytes(resultString), "application/octet-stream", outputFileName));
        }
Exemplo n.º 3
0
        // GET api/<controller>
        public IHttpActionResult Get([FromUri] string[] region, [FromUri] string[] o365service, string outputformat, bool complement = false, bool summarize = false)
        {
            int resultCount;
            // validate if proprer region or o365 service (for hacking... not to break service);
            var resultString = GenerationHelper.Generate(region, o365service, outputformat, complement, summarize, out resultCount);

            return(Json(new { count = resultCount, encodedResultString = WebUtility.HtmlEncode(resultString) }));
        }