コード例 #1
0
        static void Main(string[] args)
        {
            var collection = new ComponentCollection();

            collection.AddItem(new Component()
            {
                Name = "Mainboard", Description = "Intel", Price = 2400
            });
            collection.AddItem(new Component()
            {
                Name = "Processor", Description = "Intel", Price = 3600
            });
            collection.AddItem(new Component()
            {
                Name = "VideoCard", Description = "nVidia", Price = 4000
            });
            collection.AddItem(new Component()
            {
                Name = "VideoCard", Description = "AMD", Price = 4500
            });
            collection.AddItem(new Component()
            {
                Name = "Processor", Description = "AMD", Price = 3000
            });
            Client  client  = new Client();
            Manager manager = new Manager(client, collection);

            manager.Execute();
        }