Ejemplo n.º 1
0
        public ConstructionNode Convert(MarkupExtensionNode tree)
        {
            var identifier = tree.Identifier;
            var ns         = getNsFromPrefix(identifier.Prefix);
            var type       = resolver.LocateMarkupExtension(XName.Get(identifier.TypeName, ns));

            var arguments   = ParseArguments(tree.Options.OfType <PositionalOption>());
            var assignments = ParseAssignments(tree.Options.OfType <PropertyOption>(), type);

            return(new ConstructionNode(type)
            {
                InjectableArguments = arguments,
                Assignments = assignments,
            });
        }