public void Delete(Authorization auth) { if (Authorizations.Remove(auth)) { auth.Invalidated -= OnAuthorizationInvalidated; Save(); } }
private void LastFmLoginService_UserLogout(ILastFmLoginService sender, EventArgs e) { var item = Authorizations.FirstOrDefault(s => s.ServiceName == "last.fm"); if (item == null) { return; } Authorizations.Remove(item); Authorizations.Add(_lastFmLoginService.GetServiceAuthorization()); }