You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
593 B
28 lines
593 B
using System;
|
|
using System.Linq;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Model;
|
|
|
|
namespace LolApp.ViewModels
|
|
{
|
|
[ObservableObject]
|
|
public partial class ChampionClassVM
|
|
{
|
|
[ObservableProperty]
|
|
private ChampionClass model;
|
|
|
|
[ObservableProperty]
|
|
private bool isSelected;
|
|
|
|
public ChampionClassVM(ChampionClass model)
|
|
{
|
|
Model = model;
|
|
}
|
|
|
|
public static IEnumerable<ChampionClassVM> Classes { get; }
|
|
= Enum.GetValues(typeof(ChampionClass)).Cast<ChampionClass>().Except(new ChampionClass[] {ChampionClass.Unknown})
|
|
.Select(cc => new ChampionClassVM(cc));
|
|
}
|
|
}
|
|
|