public MeScanner (XamlParserContext context, string text, int lineNumber, int linePosition) { this._context = context; this._inputText = text; this._lineNumber = lineNumber; this._startPosition = linePosition; this._idx = -1; this._state = StringState.Value; }
public void MePullParser_Parse () { const string me = "{Binding 1, 2, Path=Name, Converter={StaticResource MyRes}, ConverterParameter={x:Static Window.LeftProperty}}"; var xamlGenerator = new XamlGenerator(null, null, null); var xamlSchema = new XamlSchemaContext( /*new[] { PresentationCore, PresentationFramework }*/); var xamlContext = new XamlParserContext(xamlSchema, GetType().Assembly); xamlContext.AddNamespacePrefix("", xamlGenerator.Ns.NamespaceName); xamlContext.AddNamespacePrefix("x", xamlGenerator.NsX.NamespaceName); var meParser = new MePullParser(xamlContext); var sb = new StringBuilder(); foreach (XamlNode xamlNode in meParser.Parse(me, 0, 0)) sb.AppendFormat("{0}\n", xamlNode); //throw new Exception(SR.Get("MissingImplicitPropertyTypeCase")); throw new Exception(sb.ToString()); }
public MePullParser (XamlParserContext stack) { this._context = stack; }
private MePullParser GetMarkupExtParser () { var xamlParserContext = new XamlParserContext(_xamlSchemaContext, GetType().Assembly); xamlParserContext.AddNamespacePrefix(NsPrefix, Ns.NamespaceName); xamlParserContext.AddNamespacePrefix(NsXPrefix, NsX.NamespaceName); return new MePullParser(xamlParserContext); }