void OnSubChanged(CBPeripheralManagerSubscriptionEventArgs args, bool subscribed) { if (!this.IsThis(args.Characteristic)) { return; } var peripheral = this.cache.SetSubscription(args.Central, subscribed); var sub = new CharacteristicSubscription(this, peripheral, subscribed); this.onSubscribe(sub); }
void OnUnSubscribed(object sender, CBPeripheralManagerSubscriptionEventArgs args) => this.OnSubChanged(args, false);