internal void SetVisible(string id, bool isVisible) { if (isVisible) { localStorage.RemoveItem(VisibleKey(id)); } else { localStorage.SetItem(VisibleKey(id), isVisible); } }
public static void RemoveAuthorizationTokens(this ISyncLocalStorageService localStorage) { if (localStorage.HasAccessToken()) { localStorage.RemoveItem(LocalStorageConstants.TokenType); localStorage.RemoveItem(LocalStorageConstants.AccessToken); } if (localStorage.HasRefreshToken()) { localStorage.RemoveItem(LocalStorageConstants.RefreshToken); } }
public void Clear() { cartItems = new List <CartItemModel>(); listeners.ForEach(action => action()); localStorage.RemoveItem(LocalStorageConstants.CartItems); }
public void Logout() { UserDetails = null; Username = null; Token = null; _localStorage.RemoveItem("Token"); UserUpdated?.Invoke(this, new UserEventArgs { UserDetails = null, IsFullRefresh = true, IsInitialCheck = false }); }
public bool Clear() { lock (thisLock) { if (localStorage.ContainKey(GetFileName())) { localStorage.RemoveItem(GetFileName()); return(true); } else { return(false); } } }
public Task LogoutAsync() { _localstorage.RemoveItem(Constants.ACCESS_TOKEN_NAME); _localstorage.RemoveItem(Constants.USER_DATA_NAME); return(_js.InvokeVoidAsync("window.location.replace", "/").AsTask()); }
public void ExitCareer() => _localStorageService.RemoveItem(LocalStorageKeys.CURRENT_CAREER);
public void ClearGuestUser() { _syncLocalStorageService.RemoveItem(_localStorageKey); OnAuthenticationStateChanged(); }