Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 protected virtual Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.GetBody());
Ejemplo n.º 3
0
 Routing IBulkOperation.GetRoutingForOperation(Inferrer inferrer) => this.GetRoutingForOperation(inferrer);
Ejemplo n.º 4
0
 Id IBulkOperation.GetIdForOperation(Inferrer inferrer) => this.GetIdForOperation(inferrer);
Ejemplo n.º 5
0
 protected virtual Routing GetRoutingForOperation(Inferrer inferrer) => Routing ?? new Routing(GetBody());
Ejemplo n.º 6
0
 protected virtual Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(GetBulkOperationBody());
Ejemplo n.º 7
0
 public DslPrettyPrintVisitor(IConnectionSettingsValues settings)
 {
     _sb    = new StringBuilder();
     _infer = settings.Inferrer;
 }
Ejemplo n.º 8
0
 protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(new[] { this.InferFrom, this.Upsert }.FirstOrDefault(o => o != null));
Ejemplo n.º 9
0
 protected override Id GetIdForOperation(Inferrer inferrer) => Self.Id ?? new Id(Self.Document);
Ejemplo n.º 10
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => Self.Routing ?? new Routing(Self.Document);
Ejemplo n.º 11
0
 protected override Routing GetRoutingForOperation(Inferrer inferrer) => this.Routing ?? new Routing(this.Document);
Ejemplo n.º 12
0
 protected override Id GetIdForOperation(Inferrer inferrer) => this.Id ?? new Id(this.Document);
Ejemplo n.º 13
0
 internal FieldValues(Inferrer inferrer, IDictionary <string, LazyDocument> container)
     : base(container) => _inferrer = inferrer;
Ejemplo n.º 14
0
 public FieldValues(Inferrer inferrer, IDictionary <string, object> container)
     : base(container)
 {
     _inferrer = inferrer;
 }
Ejemplo n.º 15
0
 protected override Id GetIdForOperation(Inferrer inferrer) =>
 Self.Id ?? new Id(new[] { Self.IdFrom, Self.Upsert }.FirstOrDefault(o => o != null));