public XamlContext(string namespaceName, string baseTypeName, XamlTypeResolver xamlTypeResolver, BindingMarkupExtensionParser bindingMarkupExtensionParser, XamlElementNameResolver xamlElementNameResolver) { this.NamespaceName = namespaceName; this.BaseTypeName = baseTypeName; this.XamlTypeResolver = xamlTypeResolver; this.BindingMarkupExtensionParser = bindingMarkupExtensionParser; this.XamlElementNameResolver = xamlElementNameResolver; }
public BindingTree Parse(XElement xElement, string namespaceName, string baseTypeName, XamlTypeResolver xamlTypeResolver, XamlElementNameResolver xamlElementNameResolver) { if (!this.optInToOptimizations || this.IsOptimizing(xElement, false)) { var xamlContext = new XamlContext(namespaceName, baseTypeName, xamlTypeResolver, this.bindingMarkupExtensionParser, xamlElementNameResolver); this.Traverse(xElement, null, null, xamlContext, true); return(new BindingTree(xamlContext.BindingRootNodes)); } return(null); }