コード例 #1
0
 public HttpReader(
     SessionFactory sessionFactory,
     HttpStringQueryParser httpQueryParser,
     IConfigurationProvider config,
     ILogger <HttpReader> logger)
 {
     _logger          = logger;
     _sessionFactory  = sessionFactory;
     _httpQueryParser = httpQueryParser;
     _config          = config;
 }
コード例 #2
0
ファイル: StringQueryFormatter.cs プロジェクト: x0rzkov/resin
        public async Task <string> Format(HttpRequest request, ITextModel tokenizer)
        {
            var parser = new HttpStringQueryParser(new QueryParser <string>(_sessionFactory, tokenizer, _log));
            var query  = await parser.ParseRequest(request);

            var dictionary = new Dictionary <string, object>();

            parser.ParseQuery(query, dictionary);

            return(JsonConvert.SerializeObject(dictionary, Formatting.Indented));
        }