Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");

            var startUrl = $"https://threejs.org/examples/#webgl_animation_cloth";


            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions        = new CefDownloadOptions(true, false);
            config.WindowOptions.Position    = new WindowPosition(0, 0);
            config.WindowOptions.WindowState = WindowState.Fullscreen;
            config.WindowOptions.Size        = new WindowSize(800, 800);
            config.StartUrl = startUrl;


            try
            {
                var builder = AppBuilder.Create();
                builder = builder.UseApp <DemoChromelyApp>();
                builder = builder.UseConfiguration <DefaultConfiguration>(config);
                builder = builder.Build();
                builder.Run(args);
            }
            catch (Exception ex)
            {
                //Console.WriteLine(ex);
                throw;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create Chromely configuration
        /// </summary>
        /// <returns>Configuration</returns>
        public static IChromelyConfiguration Create()
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            // Update configuration
            config.AppName = "monochromator";
#if DEBUG
            config.StartUrl = "http://localhost:8080/";
#else
            config.StartUrl = "local://ui/index.html";
#endif
#if DEBUG
            config.DebuggingMode = true;
#else
            config.DebuggingMode = false;
#endif
            config.CefDownloadOptions = new CefDownloadOptions {
                AutoDownloadWhenMissing = false,
                DownloadSilently        = false
            };
            config.WindowOptions.RelativePathToIconFile = "icon.ico";
            config.WindowOptions.Size = new WindowSize(1280, 720);

            return(config);
        }
Exemplo n.º 3
0
        public static void Main(string[] args)
        {
            var appName      = Assembly.GetEntryAssembly()?.GetName().Name;
            var firstProcess = ServerAppUtil.IsMainProcess(args);
            var port         = ServerAppUtil.AvailablePort;

            if (firstProcess)
            {
                if (port != -1)
                {
                    // start the kestrel server in a background thread
                    AppDomain.CurrentDomain.ProcessExit += ProcessExit;
                    BlazorTaskTokenSource = new CancellationTokenSource();
                    BlazorTask            = new Task(() =>
                    {
                        CreateHostBuilder(args, port).Build().Run();
                    }, BlazorTaskTokenSource.Token, TaskCreationOptions.LongRunning);
                    BlazorTask.Start();

                    // wait till its up
                    while (ServerAppUtil.IsPortAvailable(port))
                    {
                        Thread.Sleep(1);
                    }
                }

                // Save port for later use by chromely processes
                ServerAppUtil.SavePort(appName, port);
            }
            else
            {
                // fetch port number
                port = ServerAppUtil.GetSavedPort(appName);
            }

            if (port != -1)
            {
                // start up chromely
                var core   = typeof(IChromelyConfiguration).Assembly;
                var config = DefaultConfiguration.CreateForRuntimePlatform();
                config.WindowOptions.Title = "blazor server app demo";
                config.StartUrl            = $"https://127.0.0.1:{port}";
                config.DebuggingMode       = true;
                config.WindowOptions.RelativePathToIconFile = "chromely.ico";

                try
                {
                    var builder = AppBuilder.Create();
                    builder = builder.UseConfig <DefaultConfiguration>(config);
                    builder = builder.UseApp <DemoChromelyApp>();
                    builder = builder.Build();
                    builder.Run(args);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    throw;
                }
            }
        }
Exemplo n.º 4
0
    /// <summary>
    /// Creates/initializes common infrastructure objects [Configuration, Logging, AppSetting] that are not previously added to <see cref="IServiceCollection" />.
    /// <remarks>
    /// Note: the objects [Configuration, Logging, AppSetting] will only be created/initialized if not added in:
    ///   - ConfigureCoreServices
    ///   - CoreServices
    ///   - ConfigureServices
    /// </remarks>
    /// </summary>
    /// <param name="serviceProvider">The <see cref="IServiceProvider"/> for application services.</param>
    /// <exception cref="Exception"></exception>
    public virtual void Initialize(IServiceProvider serviceProvider)
    {
        if (!_servicesConfigured || !_coreServicesConfigured || !_resolversConfigured || !_defaultHandlersConfigured)
        {
            throw new Exception("Services must be configured before application is initialized.");
        }

        #region Configuration

        var config = serviceProvider.GetService <IChromelyConfiguration>();
        if (config is null)
        {
            config = DefaultConfiguration.CreateForRuntimePlatform();
        }

        ChromelyApp.InitConfiguration(config);

        #endregion Configuration

        #region Application/User Settings

        var appSettings = serviceProvider.GetService <IChromelyAppSettings>();
        if (appSettings is null)
        {
            appSettings = new DefaultAppSettings();
        }

        var currentAppSettings = new CurrentAppSettings
        {
            Properties = appSettings
        };

        ChromelyAppUser.App = currentAppSettings;
        ChromelyAppUser.App.Properties.Read(config);

        #endregion

        #region Logger

        var logger = GetCurrentLogger(serviceProvider);
        if (logger is null)
        {
            logger = new SimpleLogger();
        }

        var defaultLogger = new DefaultLogger
        {
            Log = logger
        };
        Logger.Instance = defaultLogger;

        #endregion

        EnsureExpectedWorkingDirectory();

        _servicesInitialized = true;
    }
Exemplo n.º 5
0
        public static void Main(string[] args)
        {
            var appName      = Assembly.GetEntryAssembly()?.GetName().Name;
            var firstProcess = ServerAppUtil.IsMainProcess(args);
            var port         = ServerAppUtil.AvailablePort;

            if (firstProcess)
            {
                if (port != -1)
                {
                    var blazorTask = new Task(() => CreateHostBuilder(args, port).Build().Run(), TaskCreationOptions.LongRunning);
                    blazorTask.Start();

                    while (ServerAppUtil.IsPortAvailable(port))
                    {
                        Thread.Sleep(1);
                    }
                }

                ServerAppUtil.SavePort(appName, port);
            }
            else
            {
                port = ServerAppUtil.GetSavedPort(appName);
            }

            if (port != -1)
            {
                var core   = typeof(IChromelyConfiguration).Assembly;
                var config = DefaultConfiguration.CreateForRuntimePlatform();
                config.WindowOptions.Title = "Grimoire";
                config.StartUrl            = $"http://127.0.0.1:{port}";
#if DEBUG
                config.DebuggingMode = true;
#else
                config.DebuggingMode = false;
#endif
                config.WindowOptions.RelativePathToIconFile = "icon.ico";

                try
                {
                    var builder = AppBuilder.Create();
                    builder = builder.UseConfiguration <DefaultConfiguration>(config);
                    builder = builder.UseApp <GrimoireChromelyApp>();
                    builder = builder.Build();
                    builder.Run(args);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    throw;
                }
            }
        }
Exemplo n.º 6
0
        private static void Main(string[] args)
        {
            Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));

            var path = ApplicationInfo.ApplicationDirectory;

            Directory.SetCurrentDirectory(path);

            var settingsFile = new Profile(Path.Combine(path, "GitState.cfg"));

            new ProfileClassLoader().LoadClass(Settings, settingsFile);

            // Starting stonehenge backend
            var options = new StonehengeHostOptions
            {
                Title           = "GitState",
                StartPage       = "main",
                ServerPushMode  = ServerPushModes.LongPolling,
                PollIntervalSec = 10
            };
            var logger   = Logger.DefaultFactory.CreateLogger("GitState");
            var provider = StonehengeResourceLoader
                           .CreateDefaultLoader(logger, new VueResourceProvider(logger));
            var host = new KestrelHost(provider, options);

            if (!host.Start("localhost", 8880))
            {
                Console.WriteLine("Failed to start stonehenge server");
            }

            // Starting chromely frontend
            Console.WriteLine("Starting chromely frontend");
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions = new CefDownloadOptions(true, true);
            config.StartUrl           = host.BaseUrl;
            config.WindowOptions      = new WindowOptions
            {
                Title = "GitState",
                Size  = new WindowSize(Settings.WindowWidth, Settings.WindowHeight),
                RelativePathToIconFile = "GitState.ico"
            };
            config.DebuggingMode = true;

            AppBuilder
            .Create()
            .UseApp <ChromelyBasicApp>()
            .UseConfig <IChromelyConfiguration>(config)
            .Build()
            .Run(args);

            Console.ReadLine();
            Console.WriteLine("GitState done.");
        }
Exemplo n.º 7
0
        private static int Main(string[] args)
        {
            CiTrace("Application", "Started");
            // measure startup time (maybe including CEF download)
            _startupTimer = new Stopwatch();
            _startupTimer.Start();

            // Set default JSON serialization properties
            JsonConvert.DefaultSettings = () => new JsonSerializerSettings
            {
                ContractResolver = new CamelCasePropertyNamesContractResolver()
                {
                    NamingStrategy = new CamelCaseNamingStrategy()
                }
            };

            var core = typeof(IChromelyConfiguration).Assembly;

            CiTrace("Chromely.Core", $"{core.GetName().Version}");
            CiTrace("Platform", ChromelyRuntime.Platform.ToString());

            var appDirectory = AppDomain.CurrentDomain.BaseDirectory;

            CiTrace("AppDirectory", appDirectory);
            var startUrl = $"file:///{appDirectory}/index.html";

            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions     = new CefDownloadOptions(true, true);
            config.WindowOptions.Position = new WindowPosition(1, 2);
            config.WindowOptions.Size     = new WindowSize(1000, 600);
            config.StartUrl      = startUrl;
            config.DebuggingMode = true;
            config.WindowOptions.RelativePathToIconFile = "chromely.ico";

            CiTrace("Configuration", "Created");

            try
            {
                var builder = AppBuilder.Create();
                builder = builder.UseApp <TestApp>();
                builder = builder.UseConfiguration <DefaultConfiguration>(config);
                builder = builder.Build();
                builder.Run(args);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                throw;
            }
            CiTrace("Application", "Done");
            return(0);
        }
Exemplo n.º 8
0
        static void Main(string[] args)
        {
            Console.WriteLine("SunSpec Explorer");

            var consoleListener = new ConsoleTraceListener();

            Trace.Listeners.Add(consoleListener);

            var options = new StonehengeHostOptions
            {
                Title          = "SunSpec Explorer",
                StartPage      = "explorer",
                ServerPushMode = ServerPushModes.LongPolling,
                PollIntervalMs = 5000
            };
            var vue      = new VueResourceProvider();
            var provider = StonehengeResourceLoader.CreateDefaultLoader(vue);

            //provider.Services.AddService(typeof(InformantEngine), _engine);

            var host = new KestrelHost(provider, options);

            if (!host.Start("localhost", 8080))
            {
                Console.WriteLine("Failed to start stonehenge server");
            }

            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions = new CefDownloadOptions
            {
                AutoDownloadWhenMissing = true,
                DownloadSilently        = true
            };
            config.WindowOptions = new WindowOptions
            {
                Title = " ",
                //RelativePathToIconFile = "Informant.ico",
                Size = new WindowSize(
                    (int)(1000 * Display.GetScalingFactor()),
                    (int)(600 * Display.GetScalingFactor()))
            };
            config.DebuggingMode = true;
            config.StartUrl      = host.BaseUrl;

            AppBuilder
            .Create()
            .UseConfiguration <IChromelyConfiguration>(config)
            .UseApp <ChromelyBasicApp>()
            .Build()
            .Run(args);
        }
Exemplo n.º 9
0
        public static async Task Main(string[] args)
        {
            AppFunc appFunc = null;

            //Only setup our AspNet Core host if within the Browser Process
            //Not needed for the sub processes (render, gpu, etc)
            //TODO: Move this somewhere internal to Chromely that
            //doesn't require the extra check and supports async
            if (!args.Any(x => x.StartsWith("--type")))
            {
                var tcs = new TaskCompletionSource <AppFunc>();

                var builder = new WebHostBuilder();

                builder.ConfigureServices(services =>
                {
                    var server = new OwinServer();
                    server.UseOwin(appFunc =>
                    {
                        tcs.SetResult(appFunc);
                    });

                    services.AddSingleton <IServer>(server);
                });

                _host = builder
                        .UseStartup <Startup>()
                        .UseContentRoot(Directory.GetCurrentDirectory())
                        .Build();

                _ = _host.RunAsync();

                appFunc = await tcs.Task;
            }

            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions.Title = "Title Window";
            config.StartUrl            = "https://chromely.test";
            //config.StartUrl = "chrome://version";

            var app = new OwinChromelyBasicApp(appFunc);

            AppBuilder
            .Create()
            .UseConfig <DefaultConfiguration>(config)
            .UseApp <OwinChromelyBasicApp>(app)
            .Build()
            .Run(args);

            await _host.StopAsync();
        }
Exemplo n.º 10
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions.WindowFrameless = true;

            AppBuilder
            .Create()
            .UseConfiguration <DefaultConfiguration>(config)
            .UseApp <App>()
            .Build()
            .Run(args);
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.StartUrl = "local://dist/index.html";

            AppBuilder
            .Create()
            .UseConfig <DefaultConfiguration>(config)
            .UseApp <DemoApp>()
            .Build()
            .Run(args);
        }
        /// <summary> Bootstrap the Chromely browser. </summary>
        public static void ChromelyBootstrap(string[] args, string[] appurls)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions.Title = "Title Window";
            config.StartUrl            = appurls.First();

            AppBuilder
            .Create()
            .UseConfiguration <DefaultConfiguration>(config)
            .UseApp <ChromelyBasicApp>()
            .Build()
            .Run(args);
        }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions.Title = "chromely controllers demo";
            config.UrlSchemes.Add(new UrlScheme(DefaultSchemeName.RESOURCE, "http", "app", string.Empty, UrlSchemeType.Resource, false));
            config.StartUrl = "http://app/index.html";

            AppBuilder
            .Create()
            .UseConfiguration <DefaultConfiguration>(config)
            .UseApp <DemoChromelyApp>()
            .Build()
            .Run(args);
        }
Exemplo n.º 14
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions.Title = "Chromely IO";
            config.StartUrl            = "http://localhost:5000";
            config.DebuggingMode       = true;
            //config.ControllerAssemblies = new List<ControllerAssemblyInfo>();
            //config.ControllerAssemblies.RegisterServiceAssembly(Assembly.GetExecutingAssembly());

            AppBuilder
            .Create()
            .UseConfiguration <DefaultConfiguration>(config)
            .UseApp <ArgumentsChromelyApp>()
            .Build()
            .Run(args);
        }
Exemplo n.º 15
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions     = new CefDownloadOptions(true, true);
            config.WindowOptions.Position = new WindowPosition(1, 2);
            config.WindowOptions.Size     = new WindowSize(1024, 576);
            config.StartUrl      = "https://www.bing.com";
            config.DebuggingMode = false;

            AppBuilder
            .Create()
            .UseApp <Chromely.ChromelyBasicApp>()
            .UseConfig <DefaultConfiguration>(config)
            .Build()
            .Run(args);
        }
Exemplo n.º 16
0
        private static int Main(string[] args)
        {
            CiTrace("Application", "Started");
            // measure startup time (maybe including CEF download)
            _startupTimer = new Stopwatch();
            _startupTimer.Start();

            var core = typeof(IChromelyConfiguration).Assembly;

            CiTrace("Chromely.Core", core.GetName().Version?.ToString() ?? "");
            CiTrace("Platform", ChromelyRuntime.Platform.ToString());

            var appDirectory = AppDomain.CurrentDomain.BaseDirectory;

            CiTrace("AppDirectory", appDirectory);
            var startUrl = $"file:///{appDirectory}/index.html";

            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.CefDownloadOptions     = new CefDownloadOptions(true, true);
            config.WindowOptions.Position = new WindowPosition(1, 2);
            config.WindowOptions.Size     = new WindowSize(1000, 600);
            config.StartUrl      = startUrl;
            config.DebuggingMode = true;
            config.WindowOptions.RelativePathToIconFile = "chromely.ico";

            CiTrace("Configuration", "Created");

            try
            {
                var builder = AppBuilder.Create(args);
                builder = builder.UseConfig <DefaultConfiguration>(config);
                builder = builder.UseWindow <TestWindow>();
                builder = builder.UseApp <ChromelyBasicApp>();
                builder = builder.Build();
                builder.Run();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                throw;
            }
            CiTrace("Application", "Done");
            return(0);
        }
Exemplo n.º 17
0
    /// <summary>
    /// For adding specific core services to the application dependency injection container.
    /// </summary>
    /// <remarks>
    /// Note: services are added here if they were not previously added in ConfigureServices.
    /// This is why it uses for instance "TryAddSingleton".
    /// </remarks>
    /// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
    public virtual void ConfigureCoreServices(IServiceCollection services)
    {
        if (!_servicesConfigured)
        {
            throw new Exception("Custom services must be configured before core default services are set.");
        }

        // Add core services if not already added.
        // Expected core services are -
        // IChromelyAppSettings, IChromelyConfiguration, IChromelyLogger, IChromelyRouteProvider, IChromelyErrorHandler
        // DefaultAppSettings  DefaultConfiguration, SimpleLogger, DefaultRouteProvider, DefaultErrorHandler
        // Logger is added in Initialize method

        services.TryAddSingleton <IChromelyConfiguration>(DefaultConfiguration.CreateForRuntimePlatform());
        services.TryAddSingleton <IChromelyAppSettings, DefaultAppSettings>();
        services.TryAddSingleton <IChromelyAppSettings, DefaultAppSettings>();
        services.TryAddSingleton <IChromelyErrorHandler, DefaultErrorHandler>();

        _coreServicesConfigured = true;
    }
Exemplo n.º 18
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            //config.StartUrl = "https://google.com";
            config.StartUrl = "local://app/index.html";

            // Frameless/draggable
            //config.StartUrl = "local://app/index_frameless.html";

            // config.StartUrl = "local://app/index_draggable.html";
            // config.WindowOptions.FramelessOption.UseWebkitAppRegions = true;

            AppBuilder
            .Create(args)
            .UseConfig <DefaultConfiguration>(config)
            .UseWindow <WindowSample>()
            .UseApp <AppSample>()
            .Build()
            .Run();
        }
Exemplo n.º 19
0
        static void Main(string[] args)
        {
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            config.WindowOptions = new WindowOptions
            {
                Title                  = "ChromelyMin51",
                StartCentered          = true,
                Size                   = new WindowSize(800, 600),
                RelativePathToIconFile = "chromely.ico",
                WindowFrameless        = true,
                FramelessOption        = new FramelessOption
                {
                    UseWebkitAppRegions = true
                }
            };

            AppBuilder
            .Create()
            .UseConfig <DefaultConfiguration>(config)
            .UseApp <App>()
            .Build()
            .Run(args);
        }
Exemplo n.º 20
0
        public static void Main(string[] args)
        {
            bool firstProcess = false;

            // chromely starts multiple child processes
            // we only want to start the asp core on the first process
            //
            // ideally it would be nice if chromely allowed things to be passed to
            // the child processes through args

            Mutex mutex = null;

            try
            {
                // if this succeeds we are not the first process
                mutex = Mutex.OpenExisting("BlazorTestMutex");
            }
            catch
            {
                // must be first process
                mutex        = new Mutex(false, "BlazorTestMutex");
                firstProcess = true;
            }

            int port = -1;

            if (firstProcess)
            {
                // try to find first available local port to host blazor on
                for (int i = StartScan; i < EndScan; i++)
                {
                    if (IsPortAvailable(i))
                    {
                        port = i;
                        break;
                    }
                }

                if (port != -1)
                {
                    // start the kestrel server in a background thread
                    var blazorTask = new Task(() => CreateHostBuilder(args, port).Build().Run(), TaskCreationOptions.LongRunning);
                    blazorTask.Start();

                    // wait till its up
                    while (IsPortAvailable(port))
                    {
                        Thread.Sleep(1);
                    }
                }

                // used to pass the port number to chromely child processes
                MemoryMappedFile         mmf      = MemoryMappedFile.CreateNew("BlazorTestMap", 4);
                MemoryMappedViewAccessor accessor = mmf.CreateViewAccessor();
                accessor.Write(0, (int)port);
            }
            else
            {
                // fetch port number
                MemoryMappedFile         mmf      = MemoryMappedFile.CreateOrOpen("BlazorTestMap", 4);
                MemoryMappedViewAccessor accessor = mmf.CreateViewAccessor();
                port = accessor.ReadInt32(0);
            }

            if (port != -1)
            {
                // start up chromely
                var core   = typeof(IChromelyConfiguration).Assembly;
                var config = DefaultConfiguration.CreateForRuntimePlatform();
                config.CefDownloadOptions     = new CefDownloadOptions(true, true);
                config.WindowOptions.Position = new WindowPosition(1, 2);
                config.WindowOptions.Size     = new WindowSize(1000, 600);
                config.StartUrl      = $"https://127.0.0.1:{port}";
                config.DebuggingMode = true;
                config.WindowOptions.RelativePathToIconFile = "chromely.ico";

                try
                {
                    var builder = AppBuilder.Create();
                    builder = builder.UseApp <TestApp>();
                    builder = builder.UseConfiguration <DefaultConfiguration>(config);
                    builder = builder.Build();
                    builder.Run(args);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    throw;
                }
            }

            mutex.ReleaseMutex();
        }
Exemplo n.º 21
0
        public virtual void Initialize(IServiceCollection container, IChromelyAppSettings appSettings, IChromelyConfiguration config, IChromelyLogger chromelyLogger)
        {
            EnsureExpectedWorkingDirectory();

            #region Container

            _container = container;
            if (_container == null)
            {
                _container = new ServiceCollection();
            }

            #endregion

            #region Configuration

            if (config == null)
            {
                var configurator = new ConfigurationHandler();
                config = configurator.Parse <DefaultConfiguration>();
            }

            if (config == null)
            {
                config = DefaultConfiguration.CreateForRuntimePlatform();
            }

            InitConfiguration(config);
            config.Platform = ChromelyRuntime.Platform;

            #endregion

            #region Application/User Settings

            if (appSettings == null)
            {
                appSettings = new DefaultAppSettings(config.AppName);
            }

            var currentAppSettings = new CurrentAppSettings();
            currentAppSettings.Properties = appSettings;
            ChromelyAppUser.App           = currentAppSettings;
            ChromelyAppUser.App.Properties.Read(config);

            #endregion

            #region Logger

            if (chromelyLogger == null)
            {
                chromelyLogger = new SimpleLogger();
            }

            var defaultLogger = new DefaultLogger();
            defaultLogger.Log = chromelyLogger;
            Logger.Instance   = defaultLogger;

            #endregion

            // Register all primary objects
            _container.AddSingleton <IChromelyContainer>(new ChromelyServiceCollectionContainer(_container));
            _container.AddSingleton(_container);
            _container.AddSingleton(appSettings);
            _container.AddSingleton(config);
            _container.AddSingleton(chromelyLogger);
            _container.AddSingleton(NativeHostFactory.GetNativeHost(config));
            _container.AddChromelyMvcWithDefaultRoutes();
        }