ASP.NET 5(vNext)中的MethodBase.GetCurrentMethod()在哪里?

时间:2015-09-14 14:56:25

标签: c# asp.net asp.net-core dnx

在新的ASP.NET 5(vNext)中,获取当前方法名称的调用似乎已被删除。

下面的代码显示了我希望发出的电话:

string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name;

然而,对GetCurrentMethod()的调用将导致编译器错误。

CS0117 'MethodBase' does not contain a definition for 'GetCurrentMethod'

我正在使用DNX Core 5.0。

我已检查过.NET Core here的GitHub问题,但未发现该方法。

这是故意删除的吗?

我应该使用什么?

0 个答案:

没有答案
相关问题