.net核心OnActionExecuting控制器与ActionFilter执行顺序

时间:2019-01-11 15:13:13

标签: c# asp.net-core

我有一个G = nx.Graph() for mp in mps: G.add_node(mp.name, bipartite=0) for word in mp.speeches: G.add_node(word, bipartite=1) if not G.has_edge(mp.name, word): G.add_edge(mp.name, word, weight = 1) else: G[mp.name][word]['weight'] += 1 #Here I can simply acces the node by G[mp.name] # and the output is i.e. {'wznawiać': {'weight': 2}, 'obrady':.... nx.write_gml(G, "test.gml") G = nx.read_gml('test.gml') #Here I can't acces the node by G[mp.name], but only by it's id 类,它覆盖了BaseController。在创建的自定义操作过滤器中覆盖相同方法之前,将执行此方法。

有什么方法可以强制从ActionFilter中的OnActionExecuting方法在控制器级别声明的方法之前执行?

我的actionfilter是在startup.cs文件中设置的

OnActionExecuting

0 个答案:

没有答案