Util - Add Method: GetCurrentMethodName

This commit is contained in:
DucDangAnh 2020-06-19 10:11:16 +07:00
parent e7fe1de33e
commit 2caffc6adf

View File

@ -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<OcrResult> SendEngineRequestAsync(Mat plateImage, PlateType plateType)
{
string plateImageBase64 = Convert.ToBase64String(plateImage.ToBytes());