示例#1
0
        public static int Main(string[] args)
        {
            var mre = new ManualResetEventSlim(false);

            System.Console.CancelKeyPress += (sender, arg) => mre.Set();

            using (var logary = StartLiterate().Result)
            {
                LogaryFacadeAdapter.Initialise <Cibryy.Logging.ILogger>(logary);
                var logger = logary.GetLogger("main");
                SampleCibryyUsage(LoggerCSharpAdapter.Create <Cibryy.Logging.ILogger>(logger));

                //SampleUsage(logger).Wait();
                mre.Wait();
            }

            return(0);
        }
示例#2
0
        public static int Main(string[] args)
        {
            // normal console app boilerplate;
            var mre = new ManualResetEventSlim(false);

            System.Console.CancelKeyPress += (sender, arg) => mre.Set();

            var logary = StartLiterate().Result;

            // Usage with a library:
            LogaryFacadeAdapter.Initialise <Cibryy.Logging.ILogger>(logary);
            var logger = logary.GetLogger("main");

            SampleCibryyUsage(LoggerCSharpAdapter.Create <Cibryy.Logging.ILogger>(logger));

            // Usage in this program:
            SampleUsage(logger).Wait();

            // Wait for CTRL+C
            mre.Wait();
            return(0);
        }