|
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.Device
- {
- public class DeviceStatus
- {
- public ConcurrentDictionary<string, object> status = new ConcurrentDictionary<string, object>();
-
- public void Update(string key, object value)
- {
- status.AddOrUpdate(key, value, (key, value) => value);
- }
-
- public Dictionary<string, object> GetStatus()
- {
- return status.ToDictionary(x => x.Key, x => x.Value);
- }
- }
- }
|