コード例 #1
0
ファイル: Program.cs プロジェクト: JackFong/FreeRadical
        static void Compose()
        {
            DirectoryCatalog directoryCatalog = new DirectoryCatalog(".");
            AssemblyCatalog assemblyCatalog = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            AggregateCatalog aggregateCatalog = new AggregateCatalog();
	        aggregateCatalog.Catalogs.Add(directoryCatalog);
	        aggregateCatalog.Catalogs.Add(assemblyCatalog);

            CompositionContainer container = new CompositionContainer(aggregateCatalog);
            
            RefreshCatalog refreshCatalog = new RefreshCatalog(directoryCatalog);
            container.ComposeParts(refreshCatalog);
            
            Application.Run(container.GetExportedValue<MainShell>());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: xxcoder99/lua-inject
        static void Compose()
        {
            DirectoryCatalog directoryCatalog = new DirectoryCatalog(".");
            AssemblyCatalog  assemblyCatalog  = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            AggregateCatalog aggregateCatalog = new AggregateCatalog();

            aggregateCatalog.Catalogs.Add(directoryCatalog);
            aggregateCatalog.Catalogs.Add(assemblyCatalog);

            CompositionContainer container = new CompositionContainer(aggregateCatalog);

            RefreshCatalog refreshCatalog = new RefreshCatalog(directoryCatalog);

            container.ComposeParts(refreshCatalog);

            Application.Run(container.GetExportedValue <MainShell>());
        }