private static void Main(string[] args) { // Register the custom logging backend. var backend = new CustomLoggingBackend(); LoggingServices.DefaultBackend = backend; // Register the custom parameter formatter. LoggingServices.Formatters.Register(new FancyIntFormatter()); // Simulate some business logic. QueueProcessor.ProcessQueue(@".\Private$\SyncRequestQueue"); ExampleFormattable.Greet(new ExampleFormattable { FirstName = "Yuri", LastName = "Gagarin" }); }
public static void Greet(ExampleFormattable formattable) { Console.WriteLine($"Hello, {formattable}."); }