예제 #1
0
파일: Program.cs 프로젝트: amzak/migolib
        public static void Main(string[] args)
        {
            var logger = new LoggerConfiguration()
                         .WriteTo
                         .Console()
                         .MinimumLevel.Debug()
                         .CreateLogger();

            var container      = new StashboxContainer();
            var loggerFactory  = new SerilogLoggerFactory(logger);
            var fakeMigoLogger = loggerFactory.CreateLogger <FakeMigo>();

            var cancellationTokenSource = new CancellationTokenSource();
            var fakeMigo  = new FakeMigo("127.0.0.1", 10086, fakeMigoLogger);
            var fakeMigo2 = new FakeMigo("127.0.0.1", 10087, fakeMigoLogger);

            fakeMigo.ReplyRealStream(cancellationTokenSource.Token);
            fakeMigo2.ReplyRealStream(cancellationTokenSource.Token);

            fakeMigo.Start();
            fakeMigo2.Start();

            var resolver = new StashboxDependencyResolver(container);

            Locator.SetLocator(resolver);
            SetupDependencies(container, logger);

            Locator.CurrentMutable.InitializeSplat();
            Locator.CurrentMutable.InitializeReactiveUI();

            BuildAvaloniaApp(container)
            .StartWithClassicDesktopLifetime(args);

            fakeMigo.Stop();
            fakeMigo2.Stop();
        }
예제 #2
0
파일: CliTests.cs 프로젝트: amzak/migolib
 public void Cleanup()
 {
     _fakeMigo.Stop();
 }
예제 #3
0
 public void OneTimeTearDown()
 {
     _migo.Dispose();
     _fakeMigo.Stop();
 }
예제 #4
0
 public void OneTimeTearDown()
 {
     _fakeMigo.Stop();
 }