/// <summary> /// Quick helper around WhenStatusChanged().Where(x => x == ConnectionStatus.Disconnected) /// </summary> /// <param name="peripheral"></param> /// <returns></returns> public static IObservable <IPeripheral> WhenDisconnected(this IPeripheral peripheral) => peripheral .WhenStatusChanged() .Where(x => x == ConnectionState.Disconnected) .Select(_ => peripheral);