ILSpy
ILSpy copied to clipboard
Type/member usage missing from analysis
Steps to reproduce
- Decompile
Microsoft.AspNetCore.Routing.RouteEndpointDataSource.AddRequestDelegate(...)
in "Microsoft.AspNetCore.Routing, Version=8.0.0.0". - In the code pane, right-click
RouteEntry
; click "Analyze". - In the "Analyze" pane, expand "Instantiated By". The list is missing the method we just decompiled.
- In the code pane, right-click the property
HttpMethods
in theRouteEntry
initializer; click "Analyze". - In the "Analyze" pane, expand "set" and then "Used By". The list is missing the method we just decompiled.
Details
- Product in use: ILSpy
- Version in use: 8.2.0.7535
Thanks for your report!
Regarding RouteEntry
: The cause for this is that it is a struct and the "Instantiated By" analyzer only scans for newobj
instructions, but not initobj
. Not sure, if treating initobj
the same would be an appropriate fix.
Regarding HttpsMethods
: Yes, that should actually work. Will provide a fix.
Ideally, I'd want "Instantiated By" to include any place the decompiler would output new X
. But I guess initobj
represents default(X)
as well as new X()
for value types? I think there's an argument to be made that default
for value types does represent an instantiation.