This code file demonstrates three different architectural approaches to building a database operation system with logging capabilities. Let's analyze each approach in detail.
The file contains three distinct implementations:
static void Main(string[] args)
{
Console.WriteLine("1: SQL , 2: MYSQL");
int choice = Convert.ToInt32(Console.ReadLine());
DBFactory dBFactory = new DBFactory();
Database database = dBFactory.GetDatabase(choice);
MyDelegate pointer = new MyDelegate(Logger.CurrentLogger.Log);
database.Update(pointer);
}
Key Features:
public delegate void MyDelegate(string message);
Purpose:
void MethodName(string)