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 {
50
50
bindingset [ this ]
51
51
private string getSignature ( ) {
52
52
result =
53
- this .getDeclaringType ( ) .getUnboundDeclaration ( ) + "." + this .getName ( ) + "(" +
53
+ nestedName ( this .getDeclaringType ( ) .getUnboundDeclaration ( ) ) + "." + this .getName ( ) + "(" +
54
54
parameterQualifiedTypeNamesToString ( this ) + ")"
55
55
}
56
56
@@ -118,6 +118,21 @@ class ExternalApi extends DotNet::Callable {
118
118
}
119
119
}
120
120
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
+
121
136
/**
122
137
* Gets the limit for the number of results produced by a telemetry query.
123
138
*/
Original file line number Diff line number Diff line change @@ -25,4 +25,10 @@ public void M3()
25
25
{
26
26
var guid1 = Guid . Parse ( "{12345678-1234-1234-1234-123456789012}" ) ; // Has no flow summary
27
27
}
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
+ }
28
34
}
Original file line number Diff line number Diff line change 1
1
| System | 5 |
2
- | System.Collections.Generic | 2 |
2
+ | System.Collections.Generic | 5 |
Original file line number Diff line number Diff line change 1
1
| 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