mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Addressed review comments from hvitved
This commit is contained in:
@@ -2,22 +2,17 @@ import semmle.code.csharp.dataflow.FlowSummary
|
||||
import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Private::TestOutput
|
||||
|
||||
abstract class IncludeSummarizedCallable extends RelevantSummarizedCallable {
|
||||
/** Gets the qualified parameter types of this callable as a comma-separated string */
|
||||
/** Gets the qualified parameter types of this callable as a comma-separated string. */
|
||||
private string parameterQualifiedTypeNamesToString() {
|
||||
result =
|
||||
concat(int i |
|
||||
exists(this.getParameter(i))
|
||||
concat(Parameter p, int i |
|
||||
p = this.getParameter(i)
|
||||
|
|
||||
this.getParameter(i).getType().getQualifiedName(), ", " order by i
|
||||
p.getType().getQualifiedName(), ", " order by i
|
||||
)
|
||||
}
|
||||
|
||||
/* Gets a string representation of the input type signature of callable */
|
||||
private string getCallableSignature() {
|
||||
result = "(" + parameterQualifiedTypeNamesToString() + ")"
|
||||
}
|
||||
|
||||
/* Gets a string representing, whether the declaring type is an interface */
|
||||
/* Gets a string representing, whether the declaring type is an interface. */
|
||||
private string getCallableOverride() {
|
||||
if
|
||||
this.getDeclaringType() instanceof Interface or
|
||||
@@ -31,8 +26,8 @@ abstract class IncludeSummarizedCallable extends RelevantSummarizedCallable {
|
||||
exists(string namespace, string type |
|
||||
this.getDeclaringType().hasQualifiedName(namespace, type) and
|
||||
result =
|
||||
namespace + ";" + type + ";" + this.getCallableOverride() + ";" + this.getName() + ";" +
|
||||
this.getCallableSignature()
|
||||
namespace + ";" + type + ";" + this.getCallableOverride() + ";" + this.getName() + ";" + "("
|
||||
+ parameterQualifiedTypeNamesToString() + ")"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user