Util - Refactor Method GetCurrentMethodName

This commit is contained in:
DucDangAnh 2020-06-19 10:29:12 +07:00
parent 2bd45cf43f
commit 8e7cf287f5

View File

@ -46,8 +46,8 @@ namespace AIParkingApplication
public static string GetCurrentMethodName() public static string GetCurrentMethodName()
{ {
var strackTrace = new StackTrace(); var strackTrace = new StackTrace();
var stackFrame = strackTrace.GetFrame(1); var sf = strackTrace.GetFrame(1);
return stackFrame.GetMethod().Name; return sf.GetMethod().Name;
} }
public static async Task<OcrResult> SendEngineRequestAsync(Mat plateImage, PlateType plateType) public static async Task<OcrResult> SendEngineRequestAsync(Mat plateImage, PlateType plateType)
@ -104,6 +104,5 @@ namespace AIParkingApplication
public const string HTTP_POST_METHOD = "POST"; public const string HTTP_POST_METHOD = "POST";
public const string HTTP_POST_CONTENTTYPE = "application/json"; public const string HTTP_POST_CONTENTTYPE = "application/json";
} }
} }