C# 4.0 如何使用GetApiExplorer()获取自定义控制器中的控制器名称和可用数据
嗨,我有C# 4.0 如何使用GetApiExplorer()获取自定义控制器中的控制器名称和可用数据,c#-4.0,asp.net-mvc-4,controller,asp.net-web-api,asp.net-mvc-apiexplorer,C# 4.0,Asp.net Mvc 4,Controller,Asp.net Web Api,Asp.net Mvc Apiexplorer,嗨,我有BaseController:ApiController 和TestController:BaseController 如何获取控制器名称和TestController的相关详细信息 使用下面的代码 GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions .GroupBy(x => x.ActionDescriptor.ControllerDescriptor.Controlle
BaseController:ApiController
和TestController:BaseController
如何获取控制器名称和TestController的相关详细信息
使用下面的代码
GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions
.GroupBy(x => x.ActionDescriptor.ControllerDescriptor.ControllerName)
.Select(x => x.First().ActionDescriptor.ControllerDescriptor.ControllerName)
我可以获得BaseController
如何获取TestController的详细信息(ApiDescriptions)?我的错误 现在我对
TestController
中的以下代码进行注释。现在一切都很完美
[ApiExplorerSettings(IgnoreApi = true)]
你指的“细节”是什么?@von v:
apiscriptions