mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C#: Minor refactoring to avoid introducing name variable.
This commit is contained in:
@@ -196,12 +196,8 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
|
||||
*/
|
||||
class MicrosoftAspNetCoreMvcController extends Class {
|
||||
MicrosoftAspNetCoreMvcController() {
|
||||
exists(Assembly a, string name |
|
||||
a.getName() = name and
|
||||
(
|
||||
name = "Microsoft.AspNetCore.Mvc.Core" or
|
||||
name = "Microsoft.AspNetCore.Mvc.ViewFeatures"
|
||||
)
|
||||
exists(Assembly a |
|
||||
a.getName() = ["Microsoft.AspNetCore.Mvc.Core", "Microsoft.AspNetCore.Mvc.ViewFeatures"]
|
||||
) and
|
||||
this.isPublic() and
|
||||
not this.isAbstract() and
|
||||
|
||||
@@ -10,7 +10,7 @@ public class HomeController
|
||||
}
|
||||
|
||||
// derived from Microsoft.AspNetCore.Mvc.Controller which has suffix "Controller"
|
||||
public class HomeController1 : Controller
|
||||
public class HomeController1 : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
@@ -74,7 +74,7 @@ public abstract class NotHomeController2 : Controller
|
||||
}
|
||||
}
|
||||
|
||||
// contains generic paramiters
|
||||
// contains generic parameters
|
||||
public class NotHomeController3<T> : Controller
|
||||
{
|
||||
public string Index()
|
||||
|
||||
Reference in New Issue
Block a user