0

VS2015 shows how many references there are to a class. However if the class is started by WebApplication.Run the references are not shown.

enter image description here

The highlighted code does get executed when the application is run.

Is there any way to get the reference count for the Configure method?

Kirsten
  • 15,730
  • 41
  • 179
  • 318

1 Answers1

0

Here are two reasons ;)

  • The Startup Class is invoked by reflection (it does not implement an interface)
  • I doubt that code pieces outside of your local source code will influence the reference count. So even if somewhere deep in WebApplication.Run the Configure method is invoked (assuming directly over some magic interface), the reference code will not rise. Make sense, otherwise the counter for string would have overflow ;)
Thomas
  • 5,080
  • 27
  • 42