Search code examples
c#reflectionsonarqube

C# Mark method as called by reflection


I have a class whitch have methods called by reflection to call automatically them depending on execution environment.

I wanted to indicate that these methods are called by reflection because it seems not to be used to anyone who doesn't have knowledge of the application.

I have indicated it in the documentation section of the class but I want to ask if there is any better way also to avoid alerts of SonarQube.


Solution

  • I would try UsedImplicitlyAttribute of JetBrains Annotations.

    There is a SonarQube ReSharper CLT Plugin that might help you.