using log4net; using Newtonsoft.Json; using Service.Execute.Model; using Service.Rfid; namespace Service.Execute.Api; public class RfidApi { private static readonly ILog Log = LogManager.GetLogger(typeof(RfidApi)); //TODO::Rfid 服务地址 private static readonly string BASE_URL = "http://localhost:7243"; private static readonly HttpClient _httpClient = new HttpClient() { Timeout = TimeSpan.FromSeconds(60) }; public static async Task BeginRead() { Log.Info("BeginRead"); return RfidMgr.BeginRead(); } public static async Task StopRead() { Log.Info("StopRead"); string url = BASE_URL + "/Api/StopRead"; return RfidMgr.StopRead(); } public static async Task ReadRifd() { Log.Info("ReadRifd"); return RfidMgr.ReadRifd(); } }