private CompilerTestBase(IXamlTypeSystem typeSystem) { _typeSystem = typeSystem; Configuration = new TransformerConfiguration(typeSystem, typeSystem.FindAssembly("XamlParserTests"), new XamlLanguageTypeMappings(typeSystem) { XmlnsAttributes = { typeSystem.GetType("XamlParserTests.XmlnsDefinitionAttribute"), }, ContentAttributes = { typeSystem.GetType("XamlParserTests.ContentAttribute") }, UsableDuringInitializationAttributes = { typeSystem.GetType("XamlParserTests.UsableDuringInitializationAttribute") }, DeferredContentPropertyAttributes = { typeSystem.GetType("XamlParserTests.DeferredContentAttribute") }, RootObjectProvider = typeSystem.GetType("XamlParserTests.ITestRootObjectProvider"), UriContextProvider = typeSystem.GetType("XamlParserTests.ITestUriContext"), ProvideValueTarget = typeSystem.GetType("XamlParserTests.ITestProvideValueTarget"), ParentStackProvider = typeSystem.GetType("XamlX.Runtime.IXamlParentStackProviderV1"), XmlNamespaceInfoProvider = typeSystem.GetType("XamlX.Runtime.IXamlXmlNamespaceInfoProviderV1") } ); }
public static TransformerConfiguration Configure(IXamlTypeSystem typeSystem) { return(new TransformerConfiguration(typeSystem, typeSystem.FindAssembly("Benchmarks"), new XamlLanguageTypeMappings(typeSystem) { XmlnsAttributes = { typeSystem.GetType("Portable.Xaml.Markup.XmlnsDefinitionAttribute"), }, ContentAttributes = { typeSystem.GetType("Benchmarks.ContentAttribute") }, RootObjectProvider = typeSystem.GetType("Portable.Xaml.IRootObjectProvider"), ParentStackProvider = typeSystem.GetType("XamlX.Runtime.IXamlParentStackProviderV1") })); }
public InitializeComponentCodeGenerator(IXamlTypeSystem types) { _diagnosticsAreConnected = types.FindAssembly("Avalonia.Diagnostics") != null; }