File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed
test/query-tests/Telemetry/LibraryUsage Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class ExternalApi extends DotNet::Callable {
5050 bindingset [ this ]
5151 private string getSignature ( ) {
5252 result =
53- this .getDeclaringType ( ) .getUnboundDeclaration ( ) + "." + this .getName ( ) + "(" +
53+ nestedName ( this .getDeclaringType ( ) .getUnboundDeclaration ( ) ) + "." + this .getName ( ) + "(" +
5454 parameterQualifiedTypeNamesToString ( this ) + ")"
5555 }
5656
@@ -118,6 +118,21 @@ class ExternalApi extends DotNet::Callable {
118118 }
119119}
120120
121+ /**
122+ * Gets the nested name of the declaration.
123+ *
124+ * If the declaration is not a nested type, the result is the same as \`getName()\`.
125+ * Otherwise the name of the nested type is prefixed with a \`+\` and appended to
126+ * the name of the enclosing type, which might be a nested type as well.
127+ */
128+ private string nestedName ( Declaration declaration ) {
129+ not exists ( declaration .getDeclaringType ( ) .getUnboundDeclaration ( ) ) and
130+ result = declaration .getName ( )
131+ or
132+ nestedName ( declaration .getDeclaringType ( ) .getUnboundDeclaration ( ) ) + "+" + declaration .getName ( ) =
133+ result
134+ }
135+
121136/**
122137 * Gets the limit for the number of results produced by a telemetry query.
123138 */
Original file line number Diff line number Diff line change @@ -25,4 +25,10 @@ public void M3()
2525 {
2626 var guid1 = Guid . Parse ( "{12345678-1234-1234-1234-123456789012}" ) ; // Has no flow summary
2727 }
28+
29+ public void M4 ( )
30+ {
31+ var d = new Dictionary < string , object > ( ) ; // Uninteresting parameterless constructor
32+ var e = d . Keys . GetEnumerator ( ) . MoveNext ( ) ; // Methods on nested classes
33+ }
2834}
Original file line number Diff line number Diff line change 11| System | 5 |
2- | System.Collections.Generic | 2 |
2+ | System.Collections.Generic | 5 |
Original file line number Diff line number Diff line change 11| System.Collections.Generic#List<>.Add(T) | 2 |
2+ | System.Collections.Generic#Dictionary<,>+KeyCollection.GetEnumerator() | 1 |
3+ | System.Collections.Generic#Dictionary<,>.get_Keys() | 1 |
You can’t perform that action at this time.
0 commit comments