Ejemplo n.º 1
0
        public void Write(IWritableStream s, RelationVal v)
        {
            int k = 0;

            foreach (var e in Schema.Types.Where(t => t.OnEntity).Select(t => t.Entity))
            {
                WriteTable(s, e, v.Tables[k]);
                k += 1;
            }
            if (k != v.Tables.Count)
            {
                throw new InvalidOperationException();
            }
        }
Ejemplo n.º 2
0
        public Dictionary <String, List <Node> > Write(RelationVal v)
        {
            var TreeRelation = new Dictionary <String, List <Node> >();
            int k            = 0;

            foreach (var e in Schema.Types.Where(t => t.OnEntity).Select(t => t.Entity))
            {
                var t = WriteTable(e, v.Tables[k]);
                TreeRelation.Add(e.Name, t);
                k += 1;
            }
            if (k != v.Tables.Count)
            {
                throw new InvalidOperationException();
            }
            return(TreeRelation);
        }