Dependency Injection in Custom Validator
MIB supports dependency injection in concrete validators, allowing for more modular and testable code. The following types are supported out of the box:
- IMibLog: A logger to perform logging operations.
- IMibApiClientReadOnlyWrapper: A client for MibServerApi that ensures that the validator can only access necessary data without modifying the state.
If you declare a constructor in your concrete validator class that requests any of the types listed above, MIB will automatically resolve and inject the dependencies during runtime.
See the Dependency Injection section.