From 6e1404429fa2acb07c4b80f55755eda159805789 Mon Sep 17 00:00:00 2001 From: Frank Ray <52075808+FrankRay78@users.noreply.github.com> Date: Sat, 24 Aug 2024 21:12:31 +0100 Subject: [PATCH] Renamed TypeRegistrar to MyTypeRegistrar, making it more obvious it is a custom class the user must provide. --- docs/input/cli/commandApp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/input/cli/commandApp.md b/docs/input/cli/commandApp.md index 54da8fd2a..33444d070 100644 --- a/docs/input/cli/commandApp.md +++ b/docs/input/cli/commandApp.md @@ -67,7 +67,7 @@ registrations.AddSingleton(); // Create a type registrar and register any dependencies. // A type registrar is an adapter for a DI framework. -var registrar = new TypeRegistrar(registrations); +var registrar = new MyTypeRegistrar(registrations); // Create a new command app with the registrar // and run it with the provided arguments. @@ -76,7 +76,7 @@ return app.Run(args); ``` - `TypeRegistrar` is a custom class that implements [ITypeRegistrar](xref:T:Spectre.Console.Cli.ITypeRegistrar) and must be provided by the user. + `MyTypeRegistrar` is a custom class that implements [ITypeRegistrar](xref:T:Spectre.Console.Cli.ITypeRegistrar) and must be provided by the user. There is a working [example of dependency injection](https://github.com/spectreconsole/examples/tree/main/examples/Cli/Injection) that uses `Microsoft.Extensions.DependencyInjection` as the container. Example implementations of `ITypeRegistrar` and `ITypeResolver` are provided, which you can copy and paste to your application for dependency injection.