DoMagic() public method

public DoMagic ( ) : void
return void
示例#1
0
        static void Main(string[] args)
        {
            try
            {
                // Initialize MetroLog using the defaults
                LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new StreamingFileTarget());
                ILogManager logManager = LogManagerFactory.DefaultLogManager;

                // Inject the ILogManager manually
                SomeMagicClass c = new SomeMagicClass(logManager);
                c.DoMagic();
            }
            finally
            {
                // If we have a debugger, stop so you can see the output
                if (Debugger.IsAttached)
                    Console.ReadKey();
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            try
            {
                // Initialize MetroLog using the defaults
                LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new StreamingFileTarget());
                ILogManager logManager = LogManagerFactory.DefaultLogManager;

                // Inject the ILogManager manually
                SomeMagicClass c = new SomeMagicClass(logManager);
                c.DoMagic();
            }
            finally
            {
                // If we have a debugger, stop so you can see the output
                if (Debugger.IsAttached)
                {
                    Console.ReadKey();
                }
            }
        }