AppHostBuilderExtensions.UseMauiApp Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
UseMauiApp<TApp>(MauiAppBuilder) |
Configure pour MauiAppBuilder utiliser le spécifié |
UseMauiApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>) |
Configure pour MauiAppBuilder utiliser le spécifié |
UseMauiApp<TApp>(MauiAppBuilder)
- Source:
- AppHostBuilderExtensions.cs
- Source:
- AppHostBuilderExtensions.cs
Configure pour MauiAppBuilder utiliser le spécifié TApp
comme type d’application main.
public:
generic <typename TApp>
where TApp : class, Microsoft::Maui::IApplication[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::MauiAppBuilder ^ UseMauiApp(Microsoft::Maui::Hosting::MauiAppBuilder ^ builder);
public static Microsoft.Maui.Hosting.MauiAppBuilder UseMauiApp<TApp> (this Microsoft.Maui.Hosting.MauiAppBuilder builder) where TApp : class, Microsoft.Maui.IApplication;
static member UseMauiApp : Microsoft.Maui.Hosting.MauiAppBuilder -> Microsoft.Maui.Hosting.MauiAppBuilder (requires 'App : null and 'App :> Microsoft.Maui.IApplication)
<Extension()>
Public Function UseMauiApp(Of TApp As {Class, IApplication}) (builder As MauiAppBuilder) As MauiAppBuilder
Paramètres de type
- TApp
Type à utiliser comme application.
Paramètres
- builder
- MauiAppBuilder
MauiAppBuilder à configurer.
S’applique à
UseMauiApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>)
- Source:
- AppHostBuilderExtensions.cs
- Source:
- AppHostBuilderExtensions.cs
Configure pour MauiAppBuilder utiliser le spécifié TApp
comme type d’application main.
public:
generic <typename TApp>
where TApp : class, Microsoft::Maui::IApplication[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::MauiAppBuilder ^ UseMauiApp(Microsoft::Maui::Hosting::MauiAppBuilder ^ builder, Func<IServiceProvider ^, TApp> ^ implementationFactory);
public static Microsoft.Maui.Hosting.MauiAppBuilder UseMauiApp<TApp> (this Microsoft.Maui.Hosting.MauiAppBuilder builder, Func<IServiceProvider,TApp> implementationFactory) where TApp : class, Microsoft.Maui.IApplication;
static member UseMauiApp : Microsoft.Maui.Hosting.MauiAppBuilder * Func<IServiceProvider, 'App (requires 'App : null and 'App :> Microsoft.Maui.IApplication)> -> Microsoft.Maui.Hosting.MauiAppBuilder (requires 'App : null and 'App :> Microsoft.Maui.IApplication)
<Extension()>
Public Function UseMauiApp(Of TApp As {Class, IApplication}) (builder As MauiAppBuilder, implementationFactory As Func(Of IServiceProvider, TApp)) As MauiAppBuilder
Paramètres de type
- TApp
Type à utiliser comme application.
Paramètres
- builder
- MauiAppBuilder
MauiAppBuilder à configurer.
- implementationFactory
- Func<IServiceProvider,TApp>
Fabrique pour créer le spécifié TApp
à l’aide des services fournis dans un IServiceProvider.