예제 #1
0
 private void ResponseLoop()
 {
     lock (lockObject)
     {
         if (changedValues.Count > 0)
         {
             senderFunction?.Invoke(new InputValuesMessage
             {
                 Values = changedValues.ToList(),
             });
             changedValues.Clear();
         }
     }
 }
예제 #2
0
 private void ResponseLoop()
 {
     lock (lockObject)
     {
         if (changedValues.Count > 0)
         {
             senderFunction?.Invoke(new InputValuesMessage
             {
                 Values = changedValues.ToDictionary(v => v.Offset, v => v.GetValue())
             });
             changedValues.Clear();
         }
     }
 }