mirror of
https://github.com/github/codeql.git
synced 2026-04-19 22:14:01 +02:00
C#: Add abstract controller remote flow source example.
This commit is contained in:
@@ -58,4 +58,9 @@ namespace Testing
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class AbstractTestController : Controller
|
||||
{
|
||||
public void MyActionMethod(string param) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,15 @@ public class HomeController5 : HomeController4
|
||||
}
|
||||
}
|
||||
|
||||
// is abstract
|
||||
public abstract class HomeController6 : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
return "This is Home Controller";
|
||||
}
|
||||
}
|
||||
|
||||
// is not public
|
||||
internal class NotHomeController : Controller
|
||||
{
|
||||
@@ -65,17 +74,8 @@ internal class NotHomeController : Controller
|
||||
}
|
||||
}
|
||||
|
||||
// is abstract
|
||||
public abstract class NotHomeController2 : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
return "This is Home Controller";
|
||||
}
|
||||
}
|
||||
|
||||
// contains generic parameters
|
||||
public class NotHomeController3<T> : Controller
|
||||
public class NotHomeController2<T> : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public class NotHomeController3<T> : Controller
|
||||
|
||||
// has [NonController] attribute
|
||||
[NonController]
|
||||
public class NotHomeController4 : Controller
|
||||
public class NotHomeController3 : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
@@ -94,10 +94,10 @@ public class NotHomeController4 : Controller
|
||||
}
|
||||
|
||||
// derived from a class that has [NonController] attribute
|
||||
public class NotController : NotHomeController4
|
||||
public class NotController : NotHomeController3
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
return "This is Home Controller";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user