File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
csharp/ql/lib/semmle/code/cil Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,19 @@ class Attribute extends Element, @cil_attribute {
27
27
28
28
override CS:: Location getLocation ( ) { result = getDeclaration ( ) .getLocation ( ) }
29
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
+ }
You can’t perform that action at this time.
0 commit comments