执行代码清理,修复warning

This commit is contained in:
2023-11-06 19:59:12 +08:00
parent c6b8dfc861
commit 1dbb17f103
118 changed files with 5046 additions and 4111 deletions

View File

@@ -2,16 +2,16 @@
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.DependencyInjection;
namespace Tnb.WarehouseMgr
namespace Tnb.WarehouseMgr.Extensions
{
public class WareHouseBasedControllerActivator : IControllerActivator
{
public object Create(ControllerContext context)
{
if (context == null) { throw new ArgumentNullException("context"); }
var controllerType = context.ActionDescriptor.ControllerTypeInfo.AsType();
Type controllerType = context.ActionDescriptor.ControllerTypeInfo.AsType();
//获取Controller实例
var controller = context.HttpContext.RequestServices.GetRequiredService(controllerType);
object controller = context.HttpContext.RequestServices.GetRequiredService(controllerType);
//判断是否继承了自定义Controller基类
//if(controller is BaseWareHouseService basedWhSvc)
//{