コード例 #1
0
        static void Main(string[] args)
        {
            ProductManager productManager = new ProductManager(new Log4NetAdapter());

            productManager.Save();
            Console.ReadLine();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            ProductManager productManager = new ProductManager(new Log4NetAdapter()); //buraya parametre olarak EdLogger yazarsak bizim yazdığımız işlem okunur Log4Net yazarsak adapte ettiğimiz işlem okunur

            productManager.Save();

            Console.ReadLine();
        }
コード例 #3
0
        static void Main(string[] args)
        {
            //Farklı sistemlerin kendi sistemlerimize entegre edilmesi durumunda kendi sistemimizin bozulmadan farklı sistemin ise sanki kendi sistemimizmiş gibi davranmasıdır. Bir servisi direk olarak bir metodun içinde kullanırsak o servise bağımlı hale geliriz.

            ProductManager prManager = new ProductManager(new Log4NetAdapter());

            prManager.Save();
            Console.ReadLine();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            ProductManager productManager = new ProductManager(new Log4NetAdapter());

            //ProductManager productManager = new ProductManager(new MyLogger());
            //farklı loglama çeşitleri eklenerek adapter deseniyle burada new'lenebilir
            productManager.Save();
            Console.ReadLine();
        }
コード例 #5
0
        static void Main(string[] args)
        {
            //önemli bir desen
            //farklı bir sistemin kendi sistemimize eklenmesi sonucu kendi sistemimiz gibi çalışmasına diyebiliriz.
            ProductManager productManager = new ProductManager(new Log4NetAdapter());

            productManager.Save();
            Console.ReadLine();
        }
コード例 #6
0
        static void Main(string[] args)
        {
            ProductManager productManager = new ProductManager(new TaLogger());

            productManager.Save();
            ProductManager productManager1 = new ProductManager(new Log4NetAdapter());

            productManager1.Save();
        }
コード例 #7
0
        static void Main(string[] args)
        {
            ProductManager productManager1 = new ProductManager(new SsLogger());
            ProductManager productManager2 = new ProductManager(new Log4NetAdapter());

            productManager1.Save();
            Console.WriteLine();
            productManager2.Save();
            Console.ReadLine();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: hamitdogan17/DesignPatters
        static void Main(string[] args)
        {
            //ProductManager productManager = new ProductManager(new HdLogger());
            //productManager.Save();
            //Console.ReadLine();

            ProductManager productManager2 = new ProductManager(new Log4NetAdapter());

            productManager2.Save();
            Console.ReadLine();
        }