private void HeartRateValueChanged(GattCharacteristic sender, GattValueChangedEventArgs e) { byte[] data; CryptographicBuffer.CopyToByteArray(e.CharacteristicValue, out data); var args = new Events.RateChangedEventArgs() { BeatsPerMinute = Utilities.ParseHeartRateValue(data) }; OnRateChanged(args); }
/// <summary> /// Raises the <see cref="E:ValueChanged" /> event. /// </summary> /// <param name="e">The <see cref="Events.RateChangedEventArgs"/> instance containing the event data.</param> protected virtual void OnRateChanged(Events.RateChangedEventArgs e) { RateChanged?.Invoke(this, e); }