예제 #1
0
파일: Dump.cs 프로젝트: dox0/DotNet471RS3
        protected override void VisitSetOp(SetOp op, Node n)
        {
            Dictionary <string, object> attrs = new Dictionary <string, object>();

            if (OpType.UnionAll == op.OpType)
            {
                UnionAllOp uallOp = (UnionAllOp)op;
                if (null != uallOp.BranchDiscriminator)
                {
                    attrs.Add("branchDiscriminator", uallOp.BranchDiscriminator);
                }
            }
            using (new AutoXml(this, op, attrs)) {
                using (new AutoXml(this, "outputs")) {
                    foreach (Var v in op.Outputs)
                    {
                        DumpVar(v);
                    }
                }
                int i = 0;
                foreach (Node chi in n.Children)
                {
                    Dictionary <string, object> attrs2 = new Dictionary <string, object>();
                    attrs2.Add("VarMap", op.VarMap[i++].ToString());

                    using (new AutoXml(this, "input", attrs2)) {
                        VisitNode(chi);
                    }
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Copies a UnionAllOp
 /// </summary>
 /// <param name="op">The Op to Copy</param>
 /// <param name="n">The Node that references the Op</param>
 /// <returns>A copy of the original Node that references a copy of the original Op</returns>
 public override Node Visit(UnionAllOp op, Node n)
 {
     return(CopySetOp(op, n));
 }