Exemplo n.º 1
0
        public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings)
        {
            elasticsearchClientSettings.ThrowIfNull(nameof(elasticsearchClientSettings));
            _elasticsearchClientSettings = elasticsearchClientSettings;
            IdResolver           = new IdResolver(elasticsearchClientSettings);
            IndexNameResolver    = new IndexNameResolver(elasticsearchClientSettings);
            RelationNameResolver = new RelationNameResolver(elasticsearchClientSettings);
            FieldResolver        = new FieldResolver(elasticsearchClientSettings);
            RoutingResolver      = new RoutingResolver(elasticsearchClientSettings, IdResolver);

            //CreateMultiHitDelegates =
            //	new ConcurrentDictionary<Type,
            //		Action<MultiGetResponseFormatter.MultiHitTuple, IJsonFormatterResolver, ICollection<IMultiGetHit<object>>>>();
            //CreateSearchResponseDelegates =
            //	new ConcurrentDictionary<Type,
            //		Action<MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary<string, IElasticsearchResponse>>>();
        }
Exemplo n.º 2
0
 public string Id(Type type, object instance) => IdResolver.Resolve(type, instance);
Exemplo n.º 3
0
 public string Id <T>(T instance) => IdResolver.Resolve(instance);