private INamespaceRegistry CreateNamespaceRegistry()
        {
            var namespaceRegistry = new NamespaceRegistry();

            namespaceRegistry.FillFromAttributes(ScannedAssemblies);

            return(namespaceRegistry);
        }
Esempio n. 2
0
        public static IRuntimeTypeSource FromAttributes(IEnumerable<Assembly> assemblies)
        {
            var allExportedTypes = assemblies.AllExportedTypes();

            var typeFactory = new TypeFactory();

            var xamlNamespaceRegistry = new NamespaceRegistry();
            xamlNamespaceRegistry.FillFromAttributes(assemblies);

            var typeFeatureProvider = new TypeFeatureProvider(new TypeConverterProvider());
            typeFeatureProvider.FillFromAttributes(allExportedTypes);
                
            var xamlTypeRepo = new TypeRepository(xamlNamespaceRegistry, typeFactory, typeFeatureProvider);

            return new RuntimeTypeSource(xamlTypeRepo, xamlNamespaceRegistry);
        }
Esempio n. 3
0
        public static IRuntimeTypeSource FromAttributes(IEnumerable <Assembly> assemblies)
        {
            var allExportedTypes = assemblies.AllExportedTypes();

            var typeFactory = new TypeFactory();

            var xamlNamespaceRegistry = new NamespaceRegistry();

            xamlNamespaceRegistry.FillFromAttributes(assemblies);

            var typeFeatureProvider = new TypeFeatureProvider(new TypeConverterProvider());

            typeFeatureProvider.FillFromAttributes(allExportedTypes);

            var xamlTypeRepo = new TypeRepository(xamlNamespaceRegistry, typeFactory, typeFeatureProvider);

            return(new RuntimeTypeSource(xamlTypeRepo, xamlNamespaceRegistry));
        }