Dipper/Dipper.Alioth/Web/ServiceFeatureProvider.cs

13 lines
431 B
C#
Raw Normal View History

2022-11-06 22:42:32 +08:00
using System.Reflection;
using Microsoft.AspNetCore.Mvc.Controllers;
namespace Dipper.Alioth.Web;
public class ServiceFeatureProvider : ControllerFeatureProvider
{
protected override bool IsController(TypeInfo typeInfo)
{
return typeof(IService).IsAssignableFrom(typeInfo) && typeInfo.IsPublic
&& !typeInfo.IsAbstract && !typeInfo.IsGenericType;
}
}