private void DeleteApi(object parameter) { var key = parameter as ApiKeyDefinition; ApiKeys.Remove(key ?? SelectedApiKey); Update(); }
private void DeleteApi(object parameter) { var key = parameter as ApiKeyDefinition; ApiKeys.Remove(key ?? SelectedApiKey); ApiKeys = new ObservableCollection <ApiKeyDefinition>(ApiKeys); OnPropertyChanged(() => ApiKeys); }
/// <summary> /// Will remove a key from the system. It will NOT be automatically removed from the config file. You must do that manually. /// </summary> /// <param name="key"></param> public void RemoveKey(string key) { lock (ApiKeys) { if (ApiKeys.Contains(key)) { ApiKeys.Remove(key); } } }
public async Task RemoveApiKeyAsync(ExtendedUser user, ExtendedApiKey apiKey) { ApiKeys.Remove(apiKey); user.ApiKeys.Remove(apiKey); }