コード例 #1
0
        public Inferrer(IConnectionSettingsValues connectionSettings)
        {
            connectionSettings.ThrowIfNull(nameof(connectionSettings));
            _connectionSettings  = connectionSettings;
            IdResolver           = new IdResolver(connectionSettings);
            IndexNameResolver    = new IndexNameResolver(connectionSettings);
            RelationNameResolver = new RelationNameResolver(connectionSettings);
            FieldResolver        = new FieldResolver(connectionSettings);
            RoutingResolver      = new RoutingResolver(connectionSettings, IdResolver);

            CreateMultiHitDelegates =
                new ConcurrentDictionary <Type,
                                          Action <MultiGetResponseFormatter.MultiHitTuple, IJsonFormatterResolver, ICollection <IMultiGetHit <object> > > >();
            CreateSearchResponseDelegates =
                new ConcurrentDictionary <Type,
                                          Action <MultiSearchResponseFormatter.SearchHitTuple, IJsonFormatterResolver, IDictionary <string, IResponse> > >();
        }
コード例 #2
0
 public string RelationName(RelationName type) => RelationNameResolver.Resolve(type);
コード例 #3
0
 public string RelationName <T>() where T : class => RelationNameResolver.Resolve <T>();