Ejemplo n.º 1
0
        private static async Task RunOptions(ApplicationArguments applicationArguments)
        {
            Utils.AppConfiguration.LoadConfiguration(applicationArguments);
            VqlApi vqlApi = new VqlApi(applicationArguments.APIConfiguration);
            var    output = await vqlApi.Query(applicationArguments.Query);

            dynamic         records = JsonConvert.DeserializeObject(output);
            OutputFormatter result  = new OutputFormatter(records);
            StringWriter    writer  = result.Output();

            Console.WriteLine(writer.ToString());
        }
Ejemplo n.º 2
0
        public async void Query_Test()
        {
            var    configurationFile = @"api.config.yaml";
            VqlApi vqlApi            = new VqlApi(configurationFile);

            string selectstatement = "SELECT * FROM clients()";
            var    response        = await vqlApi.Query(selectstatement);

            dynamic         records = JsonConvert.DeserializeObject(response);
            OutputFormatter result  = new OutputFormatter(records);
            StringWriter    writer  = result.Output();

            output.WriteLine(writer.ToString());
        }