You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to retrieve the parameters of all public methods in a controller class.
if the parameter type is not primitive then it should get the result as is, however if the param is ref type, then it has to get all the fields of the ref type.
I was able to get all the parameters, however not able to retrieve the fields of the ref type. I have been trying with a recursive function, not successful. can someone please help me with the query.
below is the query:
import csharp
class Controller extends Class {
Controller() {
this.getName().matches("%VaultController")
}
}
from Controller c, Method m, Parameter p
where
m.getDeclaringType() = c and
m.hasModifier("public") and
p.getCallable() = m
select c.getName(), m.getName(), p.getType().getName()
The text was updated successfully, but these errors were encountered:
I am new to CodeQL. Here is the scenario I have.
I am trying to retrieve the parameters of all public methods in a controller class.
if the parameter type is not primitive then it should get the result as is, however if the param is ref type, then it has to get all the fields of the ref type.
I was able to get all the parameters, however not able to retrieve the fields of the ref type. I have been trying with a recursive function, not successful. can someone please help me with the query.
below is the query:
import csharp
class Controller extends Class {
Controller() {
this.getName().matches("%VaultController")
}
}
from Controller c, Method m, Parameter p
where
m.getDeclaringType() = c and
m.hasModifier("public") and
p.getCallable() = m
select c.getName(), m.getName(), p.getType().getName()
The text was updated successfully, but these errors were encountered: