示例#1
0
        static void Main(string[] args)
        {
            Log.Logger = SextantHost.DefaultLoggingConfiguration("TestHarness").WriteTo.Console().CreateLogger();
            SextantHost sextant = new SextantHost(basePath: Environment.CurrentDirectory, pluginName: "TestHarness", configureLogging: false);

            sextant.Initialize();


            string input;

            while (true)
            {
                input = Console.ReadLine();
                if (input.StartsWith("q"))
                {
                    break;
                }

                string[] parts = input.Split(' ');
                if (parts.Length > 1)
                {
                    // Create a journal entry
                    sextant.HandleDebug(parts);
                }
                else
                {
                    sextant.Handle(input);
                }
            }
        }
示例#2
0
        public static void VA_Init1(dynamic vaProxy)
        {
            var basePath = Path.Combine(Environment.CurrentDirectory, "Apps", "Sextant");

            // Re-configure logging
            Log.Logger = SextantHost.DefaultLoggingConfiguration(VA_DisplayName())
                         .WriteTo.Sink(new VoiceAttackSink(vaProxy))
                         .CreateLogger();

            _host = new SextantHost(basePath: basePath, pluginName: VA_DisplayName(), configureLogging: false);
            _host.Initialize();
        }