private IEnumerable<ProtoXamlInstruction> CommonNodesOfElement(XamlType owner, ProtoXamlInstruction 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; }
public static XamlInstruction PrefixDefinitionOfNamespace(ProtoXamlInstruction protoXamlInstruction) { var namespaceDeclaration = new NamespaceDeclaration(protoXamlInstruction.Namespace, protoXamlInstruction.Prefix); return new XamlInstruction(XamlInstructionType.NamespaceDeclaration, namespaceDeclaration); }
private IEnumerable <ProtoXamlInstruction> CommonNodesOfElement(XamlType owner, ProtoXamlInstruction 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); } }
public static XamlInstruction PrefixDefinitionOfNamespace(ProtoXamlInstruction protoXamlInstruction) { var namespaceDeclaration = new NamespaceDeclaration(protoXamlInstruction.Namespace, protoXamlInstruction.Prefix); return new XamlInstruction(XamlInstructionType.NamespaceDeclaration, namespaceDeclaration); }