Beispiel #1
0
        public SearchContext(HttpClient client, string core, INodeTranslator nodeTranslator = null, IResposeTranslator resposeTranslator = null)
        {
            Core    = core;
            _client = client;

            if (nodeTranslator == null)
            {
                _nodeTranslator = new NodeTranslator(new NewtonsoftJsonFieldTranslator());
            }
            else
            {
                _nodeTranslator = nodeTranslator;
            }

            if (resposeTranslator == null)
            {
                _resposeTranslator = new NewtonsoftJsonResposeTranslator();
            }
            else
            {
                _resposeTranslator = resposeTranslator;
            }
        }
Beispiel #2
0
 public SolrQueryProvider(ISearchContext solrService, INodeTranslator nodeTranslator)
 {
     _solrService    = solrService;
     _nodeTranslator = nodeTranslator;
 }
Beispiel #3
0
 public override void Translate(INodeTranslator translator, StringBuilder textBuilder) =>
 translator.Translate(this, textBuilder);
Beispiel #4
0
 public abstract void Translate(INodeTranslator translator, StringBuilder textBuilder);
Beispiel #5
0
 public MarkdownTokenTreeTranslator(INodeTranslator nodeTranslator)
 {
     this.nodeTranslator = nodeTranslator;
 }