예제 #1
0
        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"
            });
        }
예제 #2
0
 public static void Greet(ExampleFormattable formattable)
 {
     Console.WriteLine($"Hello, {formattable}.");
 }