private T OnCard <T>(CardType card, bool isPremium, Func <int, T> action) { var index = CardModel.GetCardInventoryIndex(card, isPremium); return(index >= 0 ? action(index) : default(T)); }
private T OnCard <T>(CardType card, bool isPremium, Func <int, T> action) { var index = CardModel.GetCardInventoryIndex(card, isPremium); return(index >= 0 ? action(index) : default(T)); }