public string GetFavouriteActionLabel(int ID) { FavouriteActionData existingFavouriteActionData = GetFavouriteActionData(ID); if (existingFavouriteActionData != null) { return(existingFavouriteActionData.Label); } return(string.Empty); }
public Action GenerateFavouriteAction(int ID) { FavouriteActionData existingFavouriteActionData = GetFavouriteActionData(ID); if (existingFavouriteActionData != null) { return(existingFavouriteActionData.Generate()); } return(null); }
public void SetFavourite(Action action, int ID) { FavouriteActionData existingFavouriteActionData = GetFavouriteActionData(ID); if (existingFavouriteActionData != null) { existingFavouriteActionData.Update(action); return; } FavouriteActionData newFavouriteActionData = new FavouriteActionData(action, ID); allFavouriteActionData.Add(newFavouriteActionData); }