예제 #1
0
파일: Program.cs 프로젝트: qcjwq/MEF
        static void Main(string[] args)
        {
            var demo = new DemoOne();

            var catalog = new AggregateCatalog();
            catalog.Catalogs.Add(new AssemblyCatalog(typeof(IDemo).Assembly));
            CompositionContainer container = new CompositionContainer(catalog);
            container.ComposeParts(demo);
            demo.Run();

            Console.ReadLine();
        }
예제 #2
0
파일: Program.cs 프로젝트: qcjwq/MEF
        static void Main(string[] args)
        {
            var demo = new DemoOne();

            var catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(typeof(IDemo).Assembly));
            CompositionContainer container = new CompositionContainer(catalog);

            container.ComposeParts(demo);
            demo.Run();

            Console.ReadLine();
        }