找不到核心类型或名称空间名称“ GlobalFilterCollection”

时间:2019-04-21 16:38:55

标签: c# .net-core asp.net-core-mvc .net-core-2.0

我正在将一个项目从.Net 4.6.3迁移到.Net Core 2.0。 Net Core中GlobalFilterCollection的替代品是什么?

res = regVal.findall(text)  ### output of res, res = ['CHG1234567']
            try:
                change = res[0]
            except IndexError:
                print("Index Error ")
            incomingSlack(change, channel)

Microsoft解决方案:

但是,如果不是字符串,则尝试合并。不确定如何执行此操作,

https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-2.2#filter-scopes-and-order-of-execution

    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new CustomerAuthorize());
    }

0 个答案:

没有答案