internal override string GetIdForObject(ElasticInferrer inferrer) { if (!this._Id.IsNullOrEmpty()) { return(this._Id); } return(inferrer.Id((T)_Object)); }
internal virtual ElasticsearchPathInfo <TParameters> ToPathInfo(IConnectionSettingsValues settings, TParameters queryString) { var inferrer = new ElasticInferrer(settings); var index = this._Index != null?inferrer.IndexName(this._Index) : inferrer.IndexName <T>(); var type = this._Type != null?inferrer.TypeName(this._Type) : inferrer.TypeName <T>(); var id = this._Id ?? inferrer.Id(this._Object); var pathInfo = base.ToPathInfo(queryString); pathInfo.Index = index; pathInfo.Type = type; pathInfo.Id = id; return(pathInfo); }
internal virtual ElasticsearchPathInfo <K> ToPathInfo <K>(IConnectionSettings settings, K queryString) where K : FluentQueryString <K>, new() { var inferrer = new ElasticInferrer(settings); var index = this._Index != null?inferrer.IndexName(this._Index) : inferrer.IndexName <T>(); var type = this._Type != null?inferrer.TypeName(this._Type) : inferrer.TypeName <T>(); var id = this._Id ?? inferrer.Id(this._Object); var pathInfo = new ElasticsearchPathInfo <K>() { Index = index, Type = type, Id = id }; pathInfo.QueryString = queryString ?? new K(); return(pathInfo); }
public virtual string GetIdForOperation(ElasticInferrer inferrer) { return(!this.Id.IsNullOrEmpty() ? this.Id : inferrer.Id(this.GetBody())); }
protected override string GetIdForOperation(ElasticInferrer inferrer) { return(Self.Id ?? inferrer.Id(Self.Document)); }
public override string GetIdForOperation(ElasticInferrer inferrer) { return(this.Id ?? inferrer.Id(this.Document)); }
protected virtual string GetIdForOperation(ElasticInferrer inferrer) { return(!Self.Id.IsNullOrEmpty() ? Self.Id : inferrer.Id(this.GetBulkOperationBody())); }
protected override string GetIdForOperation(ElasticInferrer inferrer) { return(Self.Id ?? inferrer.Id(Self.InferFrom) ?? inferrer.Id(Self.Upsert)); }