Ejemplo n.º 1
0
        private IEnumerable<XamlInstruction> SortNodes(IEnumerator<XamlInstruction> enumerator)
        {
            var subSet = LookaheadBuffer.GetUntilEndOfRoot(enumerator);
            var nodes = new InstructionTreeBuilder().CreateHierarchy(subSet);
            var root = new InstructionNode { Children = new Sequence<InstructionNode>(nodes.ToList()) };
            root.AcceptVisitor(new DependencySortingVisitor());

            foreach (var instruction in root.Children.SelectMany(node => node.Dump()))
            {
                yield return instruction;
            }
        }
Ejemplo n.º 2
0
        private IEnumerable <XamlInstruction> SortNodes(IEnumerator <XamlInstruction> enumerator)
        {
            var subSet = LookaheadBuffer.GetUntilEndOfRoot(enumerator);
            var nodes  = new InstructionTreeBuilder().CreateHierarchy(subSet);
            var root   = new InstructionNode {
                Children = new Sequence <InstructionNode>(nodes.ToList())
            };

            root.AcceptVisitor(new DependencySortingVisitor());

            foreach (var instruction in root.Children.SelectMany(node => node.Dump()))
            {
                yield return(instruction);
            }
        }