#pragma warning disable CS1998 public async Task Unsubscribe(ButtonEventHandlerAsync handlerAsync) { if (Handler != null) { Handler -= handlerAsync; } }
public async Task Subscribe(ButtonEventHandlerAsync handlerAsync) { if (Handler == null) { Handler += handlerAsync; await Subscribe(BUTTON_A_CHARACTERISTIC, this.OnButtonEvent); await Subscribe(BUTTON_B_CHARACTERISTIC, this.OnButtonEvent); } else { Handler += handlerAsync; } }