Exemplo n.º 1
0
 private CompilerTestBase(IXamlIlTypeSystem typeSystem)
 {
     _typeSystem   = typeSystem;
     Configuration = new XamlIlTransformerConfiguration(typeSystem,
                                                        typeSystem.FindAssembly("XamlParserTests"),
                                                        new XamlIlLanguageTypeMappings(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("XamlIl.Runtime.IXamlIlParentStackProviderV1"),
         XmlNamespaceInfoProvider = typeSystem.GetType("XamlIl.Runtime.IXamlIlXmlNamespaceInfoProviderV1")
     }
                                                        );
 }
 public static XamlIlTransformerConfiguration Configure(IXamlIlTypeSystem typeSystem)
 {
     return(new XamlIlTransformerConfiguration(typeSystem,
                                               typeSystem.FindAssembly("Benchmarks"),
                                               new XamlIlLanguageTypeMappings(typeSystem)
     {
         XmlnsAttributes =
         {
             typeSystem.GetType("Portable.Xaml.Markup.XmlnsDefinitionAttribute"),
         },
         ContentAttributes =
         {
             typeSystem.GetType("Benchmarks.ContentAttribute")
         },
         RootObjectProvider = typeSystem.GetType("Portable.Xaml.IRootObjectProvider"),
         ParentStackProvider = typeSystem.GetType("XamlIl.Runtime.IXamlIlParentStackProviderV1")
     }));
 }
Exemplo n.º 3
0
 public CompilerTestBase(IXamlIlTypeSystem typeSystem)
 {
     _typeSystem   = typeSystem;
     Configuration = new XamlIlTransformerConfiguration(typeSystem,
                                                        typeSystem.FindAssembly("XamlParserTests"),
                                                        new XamlIlLanguageTypeMappings(typeSystem)
     {
         XmlnsAttributes =
         {
             typeSystem.FindType("XamlParserTests.XmlnsDefinitionAttribute"),
         },
         ContentAttributes =
         {
             typeSystem.FindType("XamlParserTests.ContentAttribute")
         },
         RootObjectProvider = typeSystem.FindType("XamlParserTests.ITestRootObjectProvider"),
         ApplyNonMatchingMarkupExtension = typeSystem.GetType("XamlParserTests.CompilerTestBase")
                                           .Methods.First(m => m.Name == "ApplyNonMatchingMarkupExtension")
     }
                                                        );
 }