Exemple #1
0
        private static void Main(string[] args)
        {
            Thread thread = new(() => {
                AppLifecycleManager.StartApplication(args, () =>
                {
#if RELEASE
                    Microsoft.AppCenter.AppCenter.Start("26393d67-ab03-4e26-a6db-aa76bf989c21",
                                                        typeof(Microsoft.AppCenter.Analytics.Analytics), typeof(Microsoft.AppCenter.Crashes.Crashes));
#endif
                    InitializePrivateUseClasses();

                    AppDataMigration.Perform();

                    NativeFlyoutHandler.Instance = new NativeFlyoutHandler();
                    NativeFlyoutHandler.Instance.Initialize();

                    LocalizationHelper.Initialize();

                    var app = new App();
                    app.Run();
                });
            });

            //If you lauch directly from the host bridge it won't be STA.
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            AppLifecycleManager.StartApplication(args, () =>
            {
                AppDataMigration.Perform();

                DUIHandler.ForceFindDUIAndHide(false);

                LocalizationHelper.Initialize();

                var app = new App();
                app.Run();
            });
        }
Exemple #3
0
 public BrokerRunner(string metadataDir = null, IRegistryProvider registryProvider = null)
 {
     _workingDir       = Directory.GetCurrentDirectory();
     metadataDir       = metadataDir ?? Path.Combine(_workingDir, "metadata");
     _transportServers = new ITransportServer[]
     {
         new TransportServer(new PipeTransmissionServer(_workingDir), DefaultTransportSerializationProvider),
         new TransportServer(new WebSocketTransmissionServer(_workingDir), DefaultTransportSerializationProvider)
     };
     _connectionListener = new ServerConnectionListener(_transportServers);
     registryProvider    = registryProvider ?? JsonRegistryProvider.Initialize(Path.Combine(metadataDir, "interop.json"));
     _connectionTracker  = new AppLifecycleManager(metadataDir);
     _brokerProcessor    = new BrokerProcessor(
         _connectionListener.In,
         registryProvider,
         DefaultProtocolSerializationProvider,
         _connectionTracker);
     OnStop(_connectionListener.Stop);
 }
Exemple #4
0
        private static void Main(string[] args)
        {
            AppLifecycleManager.StartApplication(args, () =>
            {
                InitializePrivateUseClasses();

#if RELEASE
                Microsoft.AppCenter.AppCenter.Start("26393d67-ab03-4e26-a6db-aa76bf989c21",
                                                    typeof(Microsoft.AppCenter.Analytics.Analytics), typeof(Microsoft.AppCenter.Crashes.Crashes));
#endif

                AppDataMigration.Perform();

                DUIHandler.ForceFindDUIAndHide(false);

                LocalizationHelper.Initialize();

                var app = new App();
                app.Run();
            });
        }
Exemple #5
0
        private static void Main(string[] args)
        {
            AppLifecycleManager.StartApplication(args, () =>
            {
#if DEBUG
                Debugger.Launch();
#elif RELEASE
                Microsoft.AppCenter.AppCenter.Start("26393d67-ab03-4e26-a6db-aa76bf989c21",
                                                    typeof(Microsoft.AppCenter.Analytics.Analytics), typeof(Microsoft.AppCenter.Crashes.Crashes));
#endif
                InitializePrivateUseClasses();

                AppDataMigration.Perform();

                NativeFlyoutHandler.Instance = new NativeFlyoutHandler();
                NativeFlyoutHandler.Instance.Initialize();

                LocalizationHelper.Initialize();

                var app = new App();
                app.Run();
            });
        }