using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Edge.Core.Processor;using Edge.Core.IndustryStandardInterface.Pump; using ShellChina_EPS_Project_CarPlatePay_EpsClient_App.MessageEntity.Base; namespace ShellChina_EPS_Project_CarPlatePay_EpsClient_App { public class ShellChinaEPSClientHandler : IDeviceHandler { public IContext EPSClientContext { get; set; } private object syncObj = new object(); public void Init(IContext context) { EPSClientContext = context; } /// /// called when message received from EPS /// /// public Task Process(IContext context) { //Message received from EPS return Task.CompletedTask; } //MessageBase will replace with the 8583 message type public void WriteAsync(MessageBase request, Func responseCapture, Action callback, int timeout) { lock (syncObj) { this.EPSClientContext.Outgoing.WriteAsync(request, responseCapture,callback,timeout); } } } }