C#: Add abstract controller remote flow source example.

This commit is contained in:
Michael Nebel
2024-08-21 12:08:21 +02:00
parent 5d14307ea2
commit 75772c5832
2 changed files with 19 additions and 14 deletions

View File

@@ -58,4 +58,9 @@ namespace Testing
app.Run();
}
}
}
public abstract class AbstractTestController : Controller
{
public void MyActionMethod(string param) { }
}
}

View File

@@ -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";
}
}
}