Пример #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}.");
 }