From 6ad5989c25d63880fd87b7866ec30c9a96cf979a Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Sun, 24 Apr 2022 19:54:37 +0000 Subject: [PATCH] Update readme --- Readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index b5edf1d..ed71b31 100644 --- a/Readme.md +++ b/Readme.md @@ -34,7 +34,7 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me - Complete application framework, not just an argument parser - Minimum boilerplate and easy to get started - Class-first configuration via attributes -- Comprehensive autogenerated help text +- Comprehensive auto-generated help text - Support for deeply nested command hierarchies - Graceful cancellation via interrupt signals - Support for reading and writing binary data @@ -440,7 +440,7 @@ public class SubCommand : ICommand } ``` -Once configured, the user can execute a specific command by prepending its name to the passed arguments. +Once configured, the user can execute a specific command by pre-pending its name to the passed arguments. For example, running `dotnet myapp.dll cmd1 arg1 -p 42` will execute `FirstCommand` in the above example. Requesting help will show direct subcommands of the current command: @@ -528,7 +528,7 @@ Division by zero is not supported. 133 ``` -> ⚠️ Even though exit codes are represented by 32-bit integers in .NET, using values outside of 8-bit unsigned range will cause an overflow on Unix systems. +> ⚠️ Even though exit codes are represented by 32-bit integers in .NET, using values outside 8-bit unsigned range will cause an overflow on Unix systems. > To avoid unexpected results, use numbers between 1 and 255 for exit codes that indicate failure. ### Graceful cancellation @@ -569,7 +569,7 @@ public class CancellableCommand : ICommand Because **CliFx** takes responsibility for the application's entire lifecycle, it needs to be capable of instantiating various user-defined types at runtime. To facilitate that, it uses an interface called `ITypeActivator` that determines how to create a new instance of a given type. -The default implementation of `ITypeActivator` only supports types that have public parameterless constructors, which is sufficient for majority of scenarios. +The default implementation of `ITypeActivator` only supports types that have public parameterless constructors, which is sufficient for the majority of scenarios. However, in some cases you may also want to define a custom initializer, for example when integrating with an external dependency container. The following example shows how to configure your application to use [`Microsoft.Extensions.DependencyInjection`](https://nuget.org/packages/Microsoft.Extensions.DependencyInjection) as the type activator in **CliFx**: