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

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

            yield return elementToInject;

            foreach (var node in attributes.RawAttributes.Select(a => ConvertAttributeToNode(owner, a))) yield return node;
        }
Exemple #2
0
 public static XamlNode PrefixDefinitionOfNamespace(ProtoXamlNode protoXamlNode)
 {
     var namespaceDeclaration = new NamespaceDeclaration(protoXamlNode.Namespace, protoXamlNode.Prefix);
     return new XamlNode(XamlNodeType.NamespaceDeclaration, namespaceDeclaration);
 }