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()); }
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()); }