public static string Resolve(this IndexNameMarker marker, IConnectionSettingsValues connectionSettings)
		{
			if (marker == null)
				return null;
			connectionSettings.ThrowIfNull("connectionSettings");

			if (marker.Type == null)
				return marker.Name;
			return new IndexNameResolver(connectionSettings).GetIndexForType(marker.Type);
		}
Ejemplo n.º 2
0
        public static string Resolve(this Indices marker, IConnectionSettingsValues connectionSettings)
        {
            if (marker == null)
            {
                return(null);
            }

            connectionSettings.ThrowIfNull(nameof(connectionSettings));
            return(connectionSettings.Inferrer.Resolve(marker));
        }
		public static string Resolve(this IndexName marker, IConnectionSettingsValues connectionSettings)
		{
			if (marker == null)
				return null;
			connectionSettings.ThrowIfNull(nameof(connectionSettings));

			if (marker.Type == null)
				return marker.Name;
			return new IndexNameResolver(connectionSettings).Resolve(marker.Type);
		}
Ejemplo n.º 4
0
 public Inferrer(IConnectionSettingsValues connectionSettings)
 {
     connectionSettings.ThrowIfNull(nameof(connectionSettings));
     this.IdResolver                    = new IdResolver(connectionSettings);
     this.IndexNameResolver             = new IndexNameResolver(connectionSettings);
     this.TypeNameResolver              = new TypeNameResolver(connectionSettings);
     this.FieldResolver                 = new FieldResolver(connectionSettings);
     this.Contracts                     = new ConcurrentDictionary <Type, JsonContract>();
     this.CreateMultiHitDelegates       = new ConcurrentDictionary <Type, Action <MultiGetHitJsonConverter.MultiHitTuple, JsonSerializer, ICollection <IMultiGetHit <object> > > >();
     this.CreateSearchResponseDelegates = new ConcurrentDictionary <Type, Action <MultiSearchResponseJsonConverter.SearchHitTuple, JsonSerializer, IDictionary <string, object> > >();
 }
Ejemplo n.º 5
0
        public static string Resolve(this IndexNameMarker marker, IConnectionSettingsValues connectionSettings)
        {
            if (marker == null)
            {
                return(null);
            }
            connectionSettings.ThrowIfNull("connectionSettings");

            if (marker.Type == null)
            {
                return(marker.Name);
            }
            return(new IndexNameResolver(connectionSettings).GetIndexForType(marker.Type));
        }
Ejemplo n.º 6
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> > >();
        }
 public TypeNameResolver(IConnectionSettingsValues connectionSettings)
 {
     connectionSettings.ThrowIfNull(nameof(connectionSettings));
     this._connectionSettings = connectionSettings;
 }
 public IndexNameResolver(IConnectionSettingsValues connectionSettings)
 {
     connectionSettings.ThrowIfNull("connectionSettings");
     this._connectionSettings = connectionSettings;
 }
Ejemplo n.º 9
0
 public FieldResolver(IConnectionSettingsValues settings)
 {
     settings.ThrowIfNull(nameof(settings));
     _settings = settings;
 }
Ejemplo n.º 10
0
 public RelationNameResolver(IConnectionSettingsValues connectionSettings)
 {
     connectionSettings.ThrowIfNull(nameof(connectionSettings));
     _connectionSettings = connectionSettings;
 }
Ejemplo n.º 11
0
		public FieldResolver(IConnectionSettingsValues settings)
		{
			settings.ThrowIfNull(nameof(settings));
			this._settings = settings;
		}
Ejemplo n.º 12
0
 public TypeNameResolver(IConnectionSettingsValues connectionSettings)
 {
     connectionSettings.ThrowIfNull("hasDefaultIndices");
     this._connectionSettings   = connectionSettings;
     this._propertyNameResolver = new PropertyNameResolver(this._connectionSettings);
 }
		public static string Resolve(this Indices marker, IConnectionSettingsValues connectionSettings)
		{
			if (marker == null) return null;
			connectionSettings.ThrowIfNull(nameof(connectionSettings));
			return connectionSettings.Inferrer.Resolve(marker);
		}