static void Main(string[] args) { ProductManager productManager = new ProductManager(new Log4NetAdapter()); productManager.Save(); Console.ReadLine(); }
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(); }
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(); }
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(); }
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(); }
static void Main(string[] args) { ProductManager productManager = new ProductManager(new TaLogger()); productManager.Save(); ProductManager productManager1 = new ProductManager(new Log4NetAdapter()); productManager1.Save(); }
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(); }
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(); }