ClientCaller.cs 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 
  2. using Device;
  3. namespace EEMSClientCore;
  4. public partial class ClientCaller : IClientCaller
  5. {
  6. Task<Guid> IClientCaller.RegisterDevice(DeviceInfo deviceInfo)
  7. {
  8. deviceInfo.IsConnected = true;
  9. this.Invoke("RegisterDevice", deviceInfo, out Guid guid);
  10. return Task.FromResult(guid);
  11. }
  12. Task<bool> IClientCaller.FilePack(Guid guid, byte[] buffer, int current, int total)
  13. {
  14. return this.Send("FilePack", guid, buffer, current, total);
  15. }
  16. Task<bool> IClientCaller.UpdateRealTimeData(Dictionary<string, object> realtimeData)
  17. {
  18. return this.Send("UpdateRealTimeData", realtimeData);
  19. }
  20. Task<bool> IClientCaller.UpdateAlarm(IEnumerable<Alarm> alarms)
  21. {
  22. return this.Send("UpdateAlarm", alarms);
  23. }
  24. Task<bool> IClientCaller.UpdateRecipeInfo(Recipe recipeInfo)
  25. {
  26. return this.Send("UpdateRecipeInfo", recipeInfo);
  27. }
  28. void IDisposable.Dispose()
  29. {
  30. throw new NotImplementedException();
  31. }
  32. }