private IEnumerable<ProtoInstruction> CommonNodesOfElement(XamlType owner, ProtoInstruction elementToInject, AttributeFeed attributeFeed)
        {
            var attributes = attributeFeed;

            foreach (var instruction in attributes.PrefixRegistrations.Select(ConvertAttributeToNsPrefixDefinition)) yield return instruction;

            yield return elementToInject;

            foreach (var instruction in attributes.Directives.Select(ConvertDirective)) yield return instruction;
            foreach (var instruction in attributes.RawAttributes.Select(a => ConvertAttributeToNode(owner, a))) yield return instruction;
        }
        private IEnumerable <ProtoInstruction> CommonNodesOfElement(XamlType owner, ProtoInstruction elementToInject, AttributeFeed attributeFeed)
        {
            var attributes = attributeFeed;

            foreach (var instruction in attributes.PrefixRegistrations.Select(ConvertAttributeToNsPrefixDefinition))
            {
                yield return(instruction);
            }

            yield return(elementToInject);

            foreach (var instruction in attributes.Directives.Select(ConvertDirective))
            {
                yield return(instruction);
            }
            foreach (var instruction in attributes.RawAttributes.Select(a => ConvertAttributeToNode(owner, a)))
            {
                yield return(instruction);
            }
        }
Esempio n. 3
0
 public static Instruction PrefixDefinitionOfNamespace(ProtoInstruction protoInstruction)
 {
     var namespaceDeclaration = new NamespaceDeclaration(protoInstruction.Namespace, protoInstruction.Prefix);
     return new Instruction(InstructionType.NamespaceDeclaration, namespaceDeclaration);
 }
Esempio n. 4
0
        public static Instruction PrefixDefinitionOfNamespace(ProtoInstruction protoInstruction)
        {
            var namespaceDeclaration = new NamespaceDeclaration(protoInstruction.Namespace, protoInstruction.Prefix);

            return(new Instruction(InstructionType.NamespaceDeclaration, namespaceDeclaration));
        }