-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to Use Commando
Commando offers two approaches for the setup process:
- Builder Approach (starting with version 2.0.0)
- Dependency Injection Approach (before version 2.0.0)
This setup approach is the preferred one starting with version 2.0.0.
In this approach you must do the following steps:
- Use an
ApplicationBuilderto create and configure anApplicationinstance.- Needs the assembly containing your commands.
- Uses a clean fluent syntax.
- Run the
Applicationinstance.
This approach is still using dependency injection and instantiates all the objects from the Dependency Injection Approach, but everything is done by the builder object.
For more details, please refer to this page:
This setup approach is available for the older versions, but is also kept for the 2.0.0 version. It may become obsolete in the future.
In this approach you must do the following steps:
-
Create a dependency container. Three frameworks are supported:
-
Register Commando into the dependency container, using the provided helper method.
- Here you provide the assembly containing your commands.
-
Create an instance of the
Applicationclass. -
Run the
Applicationinstance.
For more details, please refer to this page: