static void Main(string[] args)
        {
            Console.WriteLine("----------OYUNCU EKLEME--------");
            Console.WriteLine("");

            BasePlayerManager playerManager = new SteamPlayerManager(new PlayerCheckManager());

            Player player = new Player {
                BirthDay = new DateTime(1998, 1, 1), FirstName = "The Beast", LastName = "The Best", Id = "12345678910"
            };
            Player player2 = new Player {
                BirthDay = new DateTime(1998, 2, 2), FirstName = "Alperen", LastName = "Mutlu", Id = "11111111111"
            };

            Console.WriteLine("");

            playerManager.Add(player);
            playerManager.Add(player2);

            Console.WriteLine("----------OYUNCU SİLME--------");
            Console.WriteLine("");

            playerManager.Delete(player2);

            Console.WriteLine("----------OYUNCU Güncelleme--------");
            Console.WriteLine("");

            playerManager.Update(player);


            Console.WriteLine("--------------------------------------");

            Console.WriteLine("----------OYUN EKLEME--------");
            Console.WriteLine("");
            BaseGameManager gameManager = new SteamGameManager();
            Game            game        = new Game {
                Id = 1, GameName = "War Rock", GameType = "FPS", Release = new DateTime(2007, 1, 1)
            };

            gameManager.Add(game);

            Game game2 = new Game {
                Id = 1, GameName = "CS:GO", GameType = "FPS", Release = new DateTime(2012, 2, 2)
            };

            gameManager.Add(game2);



            Console.WriteLine();
            gameManager.Add(game);
            gameManager.Add(game2);

            Console.WriteLine("----------OYUN SİLME-------");
            Console.WriteLine("");
            gameManager.Delete(game2);

            Console.WriteLine("----------OYUN GÜNCELLEME--------");
            Console.WriteLine("");


            gameManager.Update(game);
            Console.WriteLine("");

            Console.WriteLine("----------------------------------");

            Console.WriteLine("----------KAMPANYA  EKLEME--------");
            Console.WriteLine();

            BaseCampaignManager campaignManager = new SteamCampaignManager();
            Campaign            campaign        = new Campaign()
            {
                CampaignName = "Şahane Cuma İndirimi", Discount = 25, StartDate = new DateTime(2021, 1, 1), EndDate = new DateTime(2021, 1, 10)
            };

            campaignManager.Add(campaign);

            Campaign campaign2 = new Campaign()
            {
                CampaignName = "Yaz İndirimi", Discount = 50, StartDate = new DateTime(2021, 2, 2), EndDate = new DateTime(2021, 2, 10)
            };

            campaignManager.Add(campaign2);

            Console.WriteLine("----------KAMPANYA  SİLME--------");
            campaignManager.Delete(campaign);

            Console.WriteLine("----------KAMPANYA  GÜNCELLEME-------");
            Console.WriteLine();
            campaignManager.Update(campaign);

            Console.WriteLine("----------------------------------");


            Console.WriteLine("----------SATIŞ  EKLEME--------");
            Console.WriteLine();

            BaseSalesManager baseSalesManager = new SteamSalesManager();
            Sales            sales1           = new Sales()
            {
                Id = 1, GameName = "War ROCK"
            };

            baseSalesManager.Add(sales1);

            Sales sales2 = new Sales()
            {
                Id = 2, GameName = "CSGO"
            };

            baseSalesManager.Add(sales2);


            Console.WriteLine("----------SATIŞ  SİLME--------");
            Console.WriteLine();
            baseSalesManager.Delete(sales2);


            Console.WriteLine("----------SATIŞ  GÜNCELLEME--------");
            Console.WriteLine();

            baseSalesManager.Update(sales1);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Player player1 = new()
            {
                DateOfBirth   = new DateTime(1997, 7, 16),
                FirstName     = "Veli",
                LastName      = "",
                Id            = 11,
                NationalityId = "",
                UserName      = "******"
            };
            Player player2 = new()
            {
                DateOfBirth   = new DateTime(1990, 8, 13),
                FirstName     = "Ali",
                LastName      = "",
                Id            = 12,
                NationalityId = "",
                UserName      = "******"
            };
            Game game1 = new()
            {
                Id    = 21,
                Name  = "Call Of Duty",
                Price = 149.99
            };
            Game game2 = new()
            {
                Id    = 22,
                Name  = "walheim",
                Price = 39.99
            };
            Campaign campaign1 = new()
            {
                Id     = 33,
                Name   = "50% Holiday discount",
                Amount = 50
            };
            Campaign campaign2 = new()
            {
                Id     = 33,
                Name   = "70% First login ",
                Amount = 70
            };

            BasePlayerManager basePlayerManager = new SteamPlayerManager(new MernisServiceAdapter());

            basePlayerManager.Add(player1);

            BasePlayerManager basePlayerManager2 = new EpicgamesPlayerManager();

            basePlayerManager2.Add(player2);

            basePlayerManager2.Delete(player2);
            basePlayerManager.Update(player1);

            BaseGameManager baseGame1 = new SteamGameManager();

            baseGame1.GameAdd(game1);
            baseGame1.GameAdd(game2);


            SalesManager sales1 = new();

            sales1.Sall(player1, game1, campaign2);

            SalesManager sales2 = new();

            sales2.Sall(player2, game1);

            SalesManager sales3 = new();

            sales3.Sall(player1, game2, campaign1);
        }
    }
}