Exemple #1
0
        public void Empty_Extension_With_Space_Should_Be_Parsed()
        {
            var ni     = new NullLineInfo();
            var parsed = XamlMarkupExtensionParser.Parse(ni, "{Binding }",
                                                         n => new XamlIlAstXmlTypeReference(ni, "", n));

            Helpers.StructDiff(parsed, new XamlIlAstObjectNode(new NullLineInfo(),
                                                               new XamlIlAstXmlTypeReference(ni, "", "Binding")));
        }
Exemple #2
0
            static IXamlIlAstValueNode ParseTextValueOrMarkupExtension(string ext, XElement xel, IXamlIlLineInfo info)
            {
                if (ext.StartsWith("{"))
                {
                    if (ext.StartsWith("{}"))
                    {
                        ext = ext.Substring(2);
                    }
                    else
                    {
                        return(XamlMarkupExtensionParser.Parse(info, ext, t => ParseTypeName(info, t, xel)));
                    }
                }

                return(new XamlIlAstTextNode(info, ext));
            }