Exemplo n.º 1
0
        public App()
        {
            InitializeComponent();

#if DEBUG
            WebApplicationFactory.EnableDebugFeatures();
#endif

            WebApplicationFactory.SetHttpPort(8888);

            //Regiser Blazor app resolver
            //CUSTOMIZE HERE YOUR OWN CODE LOGIC IF NEEDED !!
            WebApplicationFactory.RegisterAppStreamResolver(() =>
            {
                //Get current class Assembly object
                var assembly = typeof(App).Assembly;

                //Name of our current Blazor package in this project, stored as a Embedded Resource
                string BlazorPackageFolder = "BlazorMobile.InteropBlazorApp.zip";

                string appPackage = $"{assembly.GetName().Name}.Package.{BlazorPackageFolder}";

                return(assembly.GetManifestResourceStream(appPackage));
            });

            MainPage = new MainPage();
        }
Exemplo n.º 2
0
        public App()
        {
            InitializeComponent();

#if DEBUG
            WebApplicationFactory.EnableDebugFeatures();
#endif
            WebApplicationFactory.SetHttpPort(8888);

            MainPage = new MainPage();
        }
Exemplo n.º 3
0
        public App()
        {
            InitializeComponent();

            ServiceRegistrationHelper.RegisterServices();

#if DEBUG
            //This allow remote debugging features
            WebApplicationFactory.EnableDebugFeatures();
#endif
            WebApplicationFactory.SetHttpPort(8888);

            MainPage = new MainPage();
        }
Exemplo n.º 4
0
        public App()
        {
            InitializeComponent();

            ServiceRegistrationHelper.RegisterServices();

#if DEBUG
            WebApplicationFactory.EnableDebugFeatures();
#endif

            WebApplicationFactory.SetHttpPort(8891);

            MainPage = new MainPage();
        }
Exemplo n.º 5
0
        public App()
        {
            InitializeComponent();

#if DEBUG
            WebApplicationFactory.EnableDebugFeatures();
#endif
            WebApplicationFactory.SetHttpPort(8888);

            //Register Blazor application package resolver
            WebApplicationFactory.RegisterAppStreamResolver(() =>
            {
                //This app assembly
                var assembly = typeof(App).Assembly;

                //Name of our current Blazor package in this project, stored as an "Embedded Resource"
                //The file is resolved through AssemblyName.NamespaceFolder.app.zip
                return(assembly.GetManifestResourceStream($"{assembly.GetName().Name}.Package.app.zip"));
            });

            MainPage = new MainPage();
        }