We use dependency injector Ninject in our C# project. The usual way of implementing it looks like this:
[Inject]
public UsersRepositoryInterface UsersRepository { private get; set; }
In addition to this, I enabled Resharper Wide Analysis for the solution, and it shows me to warnings in this line:
My inner perfectionist suffers when he sees it, and I don't know how to avoid this warning.
I know about two ways, but I don't like both of them.
UsedImplicitly
attribute in addition to Inject
. The warning will be suppressed, but I need to add this Attribute to so many places.Need to add "MeansImplicitUse" annotation for "Ninject.InjectAttribute" in JetBrains's External annotations package: https://github.com/JetBrains/ExternalAnnotations/issues/161