public void Configure(IBlazorApplicationBuilder app, WebsitesContext context) { //Populate initial data context.SeedData().GetAwaiter().GetResult(); app.AddComponent <App>("app"); }
public void Configure(IBlazorApplicationBuilder app) { JSRuntime.Current.InvokeAsync <string[]>("navigatorLanguages") .ContinueWith(t => CultureInfo.DefaultThreadCurrentCulture = t.Result.Select(c => CultureInfo.GetCultureInfo(c)).FirstOrDefault()) ; app.AddComponent <App>("app"); }
public async void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); log4net.Repository.Hierarchy.Hierarchy hierarchy = (Hierarchy)log4net.LogManager.GetRepository(Assembly.GetAssembly(typeof(Startup))); PatternLayout patternLayout = new PatternLayout(); patternLayout.ConversionPattern = "%date [%thread] %-5level %logger - %message%newline"; patternLayout.ActivateOptions(); var cca = new ConsoleAppender(); cca.Layout = patternLayout; cca.ActivateOptions(); hierarchy.Root.AddAppender(cca); hierarchy.Root.Level = Level.Debug; hierarchy.Configured = true; log.Info("test"); log.Info("Configure Done"); }
public void Configure(IBlazorApplicationBuilder app, IServiceProvider services) { try { var method = GetConfigureMethod(); Debug.Assert(method != null); var parameters = method.GetParameters(); var arguments = new object[parameters.Length]; for (var i = 0; i < parameters.Length; i++) { var parameter = parameters[i]; arguments[i] = parameter.ParameterType == typeof(IBlazorApplicationBuilder) ? app : services.GetRequiredService(parameter.ParameterType); } method.Invoke(Instance, arguments); } catch (Exception ex) { if (ex is TargetInvocationException) { ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); } throw; } }
public void Configure(IBlazorApplicationBuilder app, BlazorDbContext db) { app.AddComponent <App>("app"); // ensure db is created and up to date db.Database.Migrate(); }
public void Configure(IBlazorApplicationBuilder app) { // Technically you should be able to change "app" with something else // renaming the <app> injection point in index.html as well. But as of now (0.5.0) // it compiles but won't actually work as expected. app.AddComponent <MyApp>("app"); }
public void Configure(IBlazorApplicationBuilder app) { JSRuntime.Current.InvokeAsync <object>("ZoraGen.doneLoading"); app.Services.GetService <IZoraGenDetails>().InitAsync( app.Services.GetService <ILocalStorage>() ); app.AddComponent <App>("app"); }
public static IBlazorApplicationBuilder UseBingMaps( this IBlazorApplicationBuilder applicationBuilder, string apiKey, string mapLanguage = null) { JSRuntime.Current.InvokeAsync <object>("rpedrettiBlazorComponents.bingMaps.initScript", apiKey, mapLanguage); return(applicationBuilder); }
public void Configure(IBlazorApplicationBuilder app) { var cultureInfo = new CultureInfo("en-US"); CultureInfo.DefaultThreadCurrentCulture = cultureInfo; CultureInfo.DefaultThreadCurrentUICulture = cultureInfo; app.AddComponent <App>("app"); }
public void Configure(IBlazorApplicationBuilder app) { // Possible to add a component of your choice here. // Note that a full htmlless component is still difficult to support // given the fact that the Router needs a cshtml injectable property // to set the assembly to search when routing requests....... // app.AddComponent<App>("app"); app.AddComponent <Main>("app"); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); // Sets Blazor's message handler into Flurl, this fixes a Blazor linker problem // https://stackoverflow.com/questions/52522004/blazor-0-6-0-wipes-flurl-compatibility FlurlHttp.Configure(settings => { settings.HttpClientFactory = new HttpClientFactoryForBlazor(); }); }
public void Configure(IBlazorApplicationBuilder app) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))) { // Needed because the test server runs on a different port than the client app, // and we want to test sending/receiving cookies underling this config WebAssemblyHttpMessageHandler.DefaultCredentials = FetchCredentialsOption.Include; } app.AddComponent <Index>("root"); }
public static IBlazorApplicationBuilder UseDefaultStyles(this IBlazorApplicationBuilder builder) { var fontEngine = builder.Services.GetService <IFontEngine>(); if (fontEngine is null) { throw new InvalidOperationException(AddSerficesErrorMessage); } var fabricConfig = builder.Services.GetService <IFabricConfig>(); if (fabricConfig is null) { throw new InvalidOperationException(AddSerficesErrorMessage); } var baseUrl = fabricConfig?.FontBaseUrl != null ? fabricConfig.FontBaseUrl : FontEngine.DefaultBaseUrl; fontEngine.RegisterDefaultFontFaces(baseUrl); return(builder); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); // app.UseCors(builder => builder.WithOrigins("http://www.jkanawall.net", "http://localhost")); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); //app.UseStaticFiles(); }
public void Configure(IBlazorApplicationBuilder app) => app.AddComponent <App>(nameof(app));
public void Configure(IBlazorApplicationBuilder app, IServiceProvider services) { ConfigureCalled = true; }
public void Configure(IBlazorApplicationBuilder app) { BrowserHttpMessageHandler.DefaultCredentials = FetchCredentialsOption.Omit; app.AddComponent <App>("app"); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <Main>("body"); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <EmptyStarterTemplate.App.App>("app"); }
public void Configure(IBlazorApplicationBuilder blazorApplicationBuilder) { blazorApplicationBuilder.AddComponent <MyApp>("myApp"); }
/// <summary> /// Associates the component type with the application, /// causing it to be displayed in the specified DOM element. /// </summary> /// <param name="app">The <see cref="IBlazorApplicationBuilder"/>.</param> /// <typeparam name="TComponent">The type of the component.</typeparam> /// <param name="domElementSelector">A CSS selector that uniquely identifies a DOM element.</param> public static void AddComponent <TComponent>(this IBlazorApplicationBuilder app, string domElementSelector) where TComponent : IComponent { app.AddComponent(typeof(TComponent), domElementSelector); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); ((IJSInProcessRuntime)JSRuntime.Current).Invoke <bool>("_blazorXstartup.dnSetReady"); }
public void Configure(IBlazorApplicationBuilder _) => _.AddComponent(typeof(Home), "app");
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <Pages.IssueMover>("app"); }
public void Configure(IBlazorApplicationBuilder app) { app.UseNObservable(); app.AddComponent <App>("app"); }
public void Configure(IBlazorApplicationBuilder app, string foo) { Arguments.Add(app); Arguments.Add(foo); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); app.UseBingMaps("AkUyQ5km3V0tUHk_BL1gRFWunbT1x6dlbH_0mUHDREAHPgsJ1LlpS0ma2-0SIvV7"); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); }
public void Configure(IBlazorApplicationBuilder app) { app.AddComponent <App>("app"); app.InitAmbientLightSensor(); }