private void Resume(State state) { try { using (_mutex.GetLock(state)) { _enabled = true; _discardLogs = false; state = _mutex.InvalidateState(); } } catch (StatefulMutexException) { AppCenterLog.Warn(AppCenterLog.LogTag, "The Resume operation has been cancelled"); } CheckPendingLogs(state); }
/// <summary> /// Resume channel. /// </summary> /// <param name="state">Current state.</param> /// <param name="needEnableChannel">Value indicating whether channel should be enabled. True by default.</param> private void Resume(State state, bool needEnableChannel = true) { AppCenterLog.Debug(AppCenterLog.LogTag, $"Resume channel: '{Name}'"); try { using (_mutex.GetLock(state)) { if (needEnableChannel) { _enabled = true; } _discardLogs = false; state = _mutex.InvalidateState(); } } catch (StatefulMutexException) { AppCenterLog.Warn(AppCenterLog.LogTag, "The resume operation has been canceled"); } CheckPendingLogs(state); }