Exemple #1
0
        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());
Exemple #7
0
 public DslPrettyPrintVisitor(IConnectionSettingsValues settings)
 {
     _sb    = new StringBuilder();
     _infer = settings.Inferrer;
 }
Exemple #8
0
 protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(new[] { this.InferFrom, this.Upsert }.FirstOrDefault(o => o != null));
Exemple #9
0
 protected override Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(Self.Document);
Exemple #10
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => Self.Routing ?? new Routing(Self.Document);
Exemple #11
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => this.Routing ?? new Routing(this.Document);
Exemple #12
0
 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;
 }
Exemple #15
0
 protected override Id GetIdForOperation(Inferrer inferrer) =>
 Self.Id ?? new Id(new[] { Self.IdFrom, Self.Upsert }.FirstOrDefault(o => o != null));