private ProtoXamlInstruction Element(Type type, NamespaceDeclaration nsDecl, bool isEmpty)
 {
     return(new ProtoXamlInstruction
     {
         Namespace = nsDecl.Namespace,
         Prefix = nsDecl.Prefix,
         XamlType = typeContext.GetXamlType(type),
         NodeType = isEmpty ? NodeType.EmptyElement : NodeType.Element,
     });
 }
Example #2
0
        private IList <XamlType> GetTypesOfBestCtorMatch(XamlType xamlType, int count)
        {
            var constructor = SelectConstructor(xamlType, count);

            return(constructor.GetParameters().Select(arg => typeContext.GetXamlType(arg.ParameterType)).ToList());
        }