EmbeddingExtensions.UseMauiEmbeddedApp 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseMauiEmbeddedApp<TApp>(MauiAppBuilder) |
將 MauiAppBuilder 設定為使用指定的 |
UseMauiEmbeddedApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>) |
將 MauiAppBuilder 設定為使用指定的 |
UseMauiEmbeddedApp<TApp>(MauiAppBuilder)
將 MauiAppBuilder 設定為使用指定的 TApp
作為內嵌應用程式類型。
public:
generic <typename TApp>
where TApp : class, Microsoft::Maui::IApplication[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::MauiAppBuilder ^ UseMauiEmbeddedApp(Microsoft::Maui::Hosting::MauiAppBuilder ^ builder);
public static Microsoft.Maui.Hosting.MauiAppBuilder UseMauiEmbeddedApp<TApp> (this Microsoft.Maui.Hosting.MauiAppBuilder builder) where TApp : class, Microsoft.Maui.IApplication;
static member UseMauiEmbeddedApp : Microsoft.Maui.Hosting.MauiAppBuilder -> Microsoft.Maui.Hosting.MauiAppBuilder (requires 'App : null and 'App :> Microsoft.Maui.IApplication)
<Extension()>
Public Function UseMauiEmbeddedApp(Of TApp As {Class, IApplication}) (builder As MauiAppBuilder) As MauiAppBuilder
類型參數
- TApp
要作為內嵌應用程式的型別。
參數
- builder
- MauiAppBuilder
要設定的 MauiAppBuilder。
傳回
已設定 MauiAppBuilder的 。
適用於
UseMauiEmbeddedApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>)
將 MauiAppBuilder 設定為使用指定的 TApp
作為內嵌應用程式類型。
public:
generic <typename TApp>
where TApp : class, Microsoft::Maui::IApplication[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::MauiAppBuilder ^ UseMauiEmbeddedApp(Microsoft::Maui::Hosting::MauiAppBuilder ^ builder, Func<IServiceProvider ^, TApp> ^ implementationFactory);
public static Microsoft.Maui.Hosting.MauiAppBuilder UseMauiEmbeddedApp<TApp> (this Microsoft.Maui.Hosting.MauiAppBuilder builder, Func<IServiceProvider,TApp> implementationFactory) where TApp : class, Microsoft.Maui.IApplication;
static member UseMauiEmbeddedApp : 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 UseMauiEmbeddedApp(Of TApp As {Class, IApplication}) (builder As MauiAppBuilder, implementationFactory As Func(Of IServiceProvider, TApp)) As MauiAppBuilder
類型參數
- TApp
要作為內嵌應用程式的型別。
參數
- builder
- MauiAppBuilder
要設定的 MauiAppBuilder。
- implementationFactory
- Func<IServiceProvider,TApp>
使用 中IServiceProvider所提供的服務建立指定TApp
之的處理站。
傳回
已設定 MauiAppBuilder的 。