Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }