public static void SetRouteParameters <TParameters>( IDocumentOptionalPath <TParameters> path, IConnectionSettingsValues settings, ElasticsearchPathInfo <TParameters> pathInfo) where TParameters : IRequestParameters, new() { var inferrer = settings.Inferrer; pathInfo.Index = inferrer.IndexName(path.Index); pathInfo.Type = inferrer.TypeName(path.Type); pathInfo.Id = path.Id; }
public static void SetRouteParameters <TParameters, T>( IDocumentOptionalPath <TParameters, T> path, IConnectionSettingsValues settings, ElasticsearchPathInfo <TParameters> pathInfo) where TParameters : IRequestParameters, new() where T : class { var inferrer = settings.Inferrer; var index = path.Index != null?inferrer.IndexName(path.Index) : inferrer.IndexName <T>(); var type = path.Type != null?inferrer.TypeName(path.Type) : inferrer.TypeName <T>(); var id = path.Id ?? inferrer.Id(path.IdFrom); pathInfo.Index = index; pathInfo.Type = type; pathInfo.Id = id; }