HostingExtensions.UseCommandHandler Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ UseCommandHandler(Microsoft::Extensions::Hosting::IHostBuilder ^ builder, Type ^ commandType, Type ^ handlerType);
C#
public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler(this Microsoft.Extensions.Hosting.IHostBuilder builder, Type commandType, Type handlerType);
static member UseCommandHandler : Microsoft.Extensions.Hosting.IHostBuilder * Type * Type -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseCommandHandler (builder As IHostBuilder, commandType As Type, handlerType As Type) As IHostBuilder
Parameters
- builder
- IHostBuilder
- commandType
- Type
- handlerType
- Type
Returns
Applies to
.NET Standard 2.1 (package-provided) a .NET Standard 2.0 (package-provided)
Produkt | Verze |
---|---|
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
public:
generic <typename TCommand, typename THandler>
where TCommand : System::CommandLine::Command where THandler : System::CommandLine::Invocation::ICommandHandler[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ UseCommandHandler(Microsoft::Extensions::Hosting::IHostBuilder ^ builder);
C#
public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler<TCommand,THandler>(this Microsoft.Extensions.Hosting.IHostBuilder builder) where TCommand : System.CommandLine.Command where THandler : System.CommandLine.Invocation.ICommandHandler;
static member UseCommandHandler : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHostBuilder (requires 'Command :> System.CommandLine.Command and 'Handler :> System.CommandLine.Invocation.ICommandHandler)
<Extension()>
Public Function UseCommandHandler(Of TCommand As Command, THandler As Command) (builder As IHostBuilder) As IHostBuilder
Type Parameters
- TCommand
- THandler
Parameters
- builder
- IHostBuilder
Returns
Applies to
.NET Standard 2.1 (package-provided) a .NET Standard 2.0 (package-provided)
Produkt | Verze |
---|---|
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.
Zpětná vazba k produktu .NET
.NET je open source projekt. Vyberte odkaz pro poskytnutí zpětné vazby: