Dipper/Dipper.Alioth/Providers/StarletFeatureProvider.cs

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