public Inferrer(IConnectionSettingsValues connectionSettings) { connectionSettings.ThrowIfNull(nameof(connectionSettings)); _connectionSettings = connectionSettings; IdResolver = new IdResolver(connectionSettings); IndexNameResolver = new IndexNameResolver(connectionSettings); TypeNameResolver = new TypeNameResolver(connectionSettings); RelationNameResolver = new RelationNameResolver(connectionSettings); FieldResolver = new FieldResolver(connectionSettings); RoutingResolver = new RoutingResolver(connectionSettings, IdResolver); Contracts = new ConcurrentDictionary <Type, JsonContract>(); CreateMultiHitDelegates = new ConcurrentDictionary <Type, Action <MultiGetHitJsonConverter.MultiHitTuple, JsonSerializer, ICollection <IMultiGetHit <object> > > >(); CreateSearchResponseDelegates = new ConcurrentDictionary <Type, Action <MultiSearchResponseJsonConverter.SearchHitTuple, JsonSerializer, IDictionary <string, object> > >(); }
public string Routing(Type type, object instance) => RoutingResolver.Resolve(type, instance);
public string Routing <T>(T document) => RoutingResolver.Resolve(document);