18 lines
458 B
C#
18 lines
458 B
C#
using System.Reflection;
|
|
using Microsoft.AspNetCore.Mvc.Controllers;
|
|
|
|
namespace Dipper.Alioth.Providers;
|
|
|
|
public class StarletFeatureProvider : ControllerFeatureProvider
|
|
{
|
|
protected override bool IsController(TypeInfo typeInfo)
|
|
{
|
|
if (!typeof(IStarlet).IsAssignableFrom(typeInfo) ||
|
|
!typeInfo.IsPublic ||
|
|
typeInfo.IsAbstract ||
|
|
typeInfo.IsGenericType)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
} |