Exemplo n.º 1
0
        public static MauiAppBuilder UseVisualRunner(this MauiAppBuilder appHostBuilder)
        {
            appHostBuilder.UseMauiApp(svc => new MauiVisualRunnerApp(
                                          svc.GetRequiredService <TestOptions>(),
                                          svc.GetRequiredService <ILoggerFactory>().CreateLogger("TestRun")));

            return(appHostBuilder);
        }
    public static MauiApp CreateMauiApp()
    {
        MauiAppBuilder builder = MauiApp.CreateBuilder();

        builder
        .UseMauiApp <App>()
        .ConfigureFonts(fonts =>
        {
            fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
        });

        builder.Services.AddMauiBlazorWebView();

        return(builder.Build());
    }
Exemplo n.º 3
0
 public static MauiAppBuilder UseMauiEmbedding <[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func <IServiceProvider, Controls.Application> implementationFactory)
     where TApp : class, IApplication
 => builder.UseMauiApp(implementationFactory);
Exemplo n.º 4
0
 public static MauiAppBuilder UseMauiEmbedding <[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder)
     where TApp : class, IApplication
 => builder.UseMauiApp <Controls.Application>();