예제 #1
0
 public static gl.Descendant VersGlobal(this Descendant e)
 {
     if (e == null)
     {
         return(null);
     }
     return(new gl.Descendant {
         id = e.id, parent = e.parent.VersGlobal(), enfant = e.enfant.VersGlobal()
     });
 }
예제 #2
0
        private List <Node> ExpandNode(Node Curr)
        {
            List <Node> Nodes = new List <Node>();

            foreach (Node Descendant in Curr.Expand())
            {
                if (Nodes.Count > 5000)
                {
                    break;
                }
                Nodes.Add(Descendant);
                if (!Descendant.IsValid())
                {
                    Nodes.AddRange(ExpandNode(Descendant));
                }
            }
            return(Nodes);
        }
예제 #3
0
        public void Test()
        {
            Key key;

            using (var session = Domain.OpenSession()) {
                using (var t = session.OpenTransaction()) {
                    var descendant = new Descendant();
                    key = descendant.Key;
                    t.Complete();
                }
            }
            using (var session = Domain.OpenSession()) {
                using (session.OpenTransaction()) {
                    var ancestor = session.Query.SingleOrDefault <Ancestor>(key);
                    Assert.IsNotNull(ancestor);

                    var descendant = session.Query.SingleOrDefault <Descendant>(key);
                    Assert.IsNotNull(descendant);
                }
            }
        }
예제 #4
0
 private bool IsResolved(Descendant constraints)
 {
     return(constraints.Left != null && this.inferredTypes.ContainsKey(constraints.Left) && !(this.inferredTypes[constraints.Left] is Anonymous) &&
            constraints.Right != null && this.inferredTypes.ContainsKey(constraints.Right) && !(this.inferredTypes[constraints.Right] is Anonymous));
 }
        public Descendant GetInstance()
        {
            var instance = new Descendant();

            return(instance);
        }