We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ff89a2 commit 821d294Copy full SHA for 821d294
1 file changed
csharp/ql/lib/semmle/code/cil/Attribute.qll
@@ -27,3 +27,19 @@ class Attribute extends Element, @cil_attribute {
27
28
override CS::Location getLocation() { result = getDeclaration().getLocation() }
29
}
30
+
31
+/** A generic attribute to a declaration. */
32
+class GenericAttribute extends Attribute {
33
+ private ConstructedType type;
34
35
+ GenericAttribute() { type = this.getType() }
36
37
+ /** Gets the total number of type arguments. */
38
+ int getNumberOfTypeArguments() { result = count(int i | cil_type_argument(type, i, _)) }
39
40
+ /** Gets the `i`th type argument, if any. */
41
+ Type getTypeArgument(int i) { result = type.getTypeArgument(i) }
42
43
+ /** Get a type argument. */
44
+ Type getATypeArgument() { result = this.getTypeArgument(_) }
45
+}
0 commit comments