终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
622 B

  1. using System;
  2. using System.Collections.Concurrent;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace BPASmartClient.Device
  8. {
  9. public class DeviceStatus
  10. {
  11. public ConcurrentDictionary<string, object> status = new ConcurrentDictionary<string, object>();
  12. public void Update(string key, object value)
  13. {
  14. status.AddOrUpdate(key, value, (key, value) => value);
  15. }
  16. public Dictionary<string, object> GetStatus()
  17. {
  18. return status.ToDictionary(x => x.Key, x => x.Value);
  19. }
  20. }
  21. }