From 2caffc6adf352a97086e622f9799dad9e3c7d75f Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Fri, 19 Jun 2020 10:11:16 +0700 Subject: [PATCH] Util - Add Method: GetCurrentMethodName --- AIParkingApplication/Util.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AIParkingApplication/Util.cs b/AIParkingApplication/Util.cs index 3578f8c..67815db 100644 --- a/AIParkingApplication/Util.cs +++ b/AIParkingApplication/Util.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using OpenCvSharp; using System; +using System.Diagnostics; using System.Net.Http; using System.Net.NetworkInformation; using System.Threading.Tasks; @@ -42,6 +43,13 @@ namespace AIParkingApplication } } + public static string GetCurrentMethodName() + { + var strackTrace = new StackTrace(); + var stackFrame = strackTrace.GetFrame(1); + return stackFrame.GetMethod().Name; + } + public static async Task SendEngineRequestAsync(Mat plateImage, PlateType plateType) { string plateImageBase64 = Convert.ToBase64String(plateImage.ToBytes());