public void NestedPropertyInfer_Test() { const string expected = "logins.loginProvider"; var inferrer = new Nest.Inferrer(new ConnectionSettings()); var actual = inferrer.NestedProperty <ElasticUser, ElasticUserLogin>(x => x.Logins, x => x.LoginProvider); Assert.Equal(expected, actual); }
protected virtual Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.GetBody());
Routing IBulkOperation.GetRoutingForOperation(Inferrer inferrer) => this.GetRoutingForOperation(inferrer);
Id IBulkOperation.GetIdForOperation(Inferrer inferrer) => this.GetIdForOperation(inferrer);
protected virtual Routing GetRoutingForOperation(Inferrer inferrer) => Routing ?? new Routing(GetBody());
protected virtual Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(GetBulkOperationBody());
public DslPrettyPrintVisitor(IConnectionSettingsValues settings) { _sb = new StringBuilder(); _infer = settings.Inferrer; }
protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(new[] { this.InferFrom, this.Upsert }.FirstOrDefault(o => o != null));
protected override Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(Self.Document);
protected override Routing GetRoutingForOperation(Inferrer inferrer) => Self.Routing ?? new Routing(Self.Document);
protected override Routing GetRoutingForOperation(Inferrer inferrer) => this.Routing ?? new Routing(this.Document);
protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.Document);
internal FieldValues(Inferrer inferrer, IDictionary <string, LazyDocument> container) : base(container) => _inferrer = inferrer;
public FieldValues(Inferrer inferrer, IDictionary <string, object> container) : base(container) { _inferrer = inferrer; }
protected override Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(new[] { Self.IdFrom, Self.Upsert }.FirstOrDefault(o => o != null));