static void Main(string[] args) { PlayerManager playerManager = new PlayerManager(new PlayerValidationManager()); //PlayerManager playerManager = new PlayerManager(new NationalityValidationManager()); // Yukarıda iki farklı ValidationService birbiri arasında switch edilebilecektir. playerManager.Add(new Player { BirthDay = Convert.ToDateTime("30.01.1985"), FirstName = "ENGİN", LastName = "DEMİROĞ", Id = 1, TcNo = 12345678910 }); List <Player> playersList = playerManager.GetAllPlayers(); foreach (var item in playersList) { Console.WriteLine(item.FirstName); } CampaignManager campaignManager = new CampaignManager(); campaignManager.CampaignAdd(new Game { GameName = "WarCaraft" }); OrderManager order = new OrderManager(new PlayerValidationManager(), campaignManager); order.GameOrder(playersList.Find(p => p.FirstName == "ENGİN"), new Game { GameName = "WarCaraft" }); }
static void Main(string[] args) { Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.BirthYear = 1985; gamer1.FirstName = "Kocakafa"; gamer1.LastName = "Gınepıgpasa"; gamer1.IdentityNumber = 12345; gamer1.GamerMoney = 1000000; Game game1 = new Game(); game1.Id = 1; game1.GameName = "Gınepıglerin En Sevdiği Oyun"; game1.UnitPrice = 10000; Campaign campaign1 = new Campaign(); campaign1.Id = 1; campaign1.CampaignName = "2020 de olanların kampanyası"; campaign1.CampaignPrice = 123; GamerManager gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(new Gamer { Id = 1, BirthYear = 1985, FirstName = "Kocakafa", LastName = "Gınepıgpasa", IdentityNumber = 12345, GamerMoney = 1000000 }); CampaignManager campaignManager = new CampaignManager(); campaignManager.CampaignAdd(new Campaign { Id = 1, CampaignName = "2020 de olanların Kampanyası", CampaignPrice = 123 }); GameManager gameManager = new GameManager(); gameManager.GameAdd(new Game { Id = 1, GameName = "Gınepıglerin En Sevdiği Oyun", UnitPrice = 10000 }); SaleManager saleManager = new SaleManager(); saleManager.ApplyCampaign(game1, campaign1); saleManager.SaleGame(gamer1, game1); }