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