The Command Service is bundled with a very barebone Dependency
Injection service for your convenience. It is recommended that you use
DI when writing your modules.
[!code-csharpIServiceProvider Setup]
In the constructor of your module, any parameters will be filled in by
the @System.IServiceProvider that you've passed.
Any publicly settable properties will also be filled in the same
manner.
[!NOTE]
Annotating a property with a DontInjectAttribute attribute will
prevent the property from being injected.
[!NOTE]
If you acceptCommandService
orIServiceProvider
as a parameter
in your constructor or as an injectable property, these entries will
be filled by theCommandService
that the module is loaded from and
theIServiceProvider
that is passed into it respectively.
[!code-csharpInjection Modules]
[!code-csharpDisallow Dependency Injection]