Dreamine.Web 1.0.0.0
WPF와 Blazor를 한 코드 흐름으로 연결하고 반복적인 MVVM 코드를 줄이는 오픈소스 FullKit 공식 웹 애플리케이션입니다.
로딩중...
검색중...
일치하는것 없음
HomeViewModel.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.MVVM.ViewModels;
4
6
15public class HomeViewModel : ViewModelBase
16{
25 private readonly ILibraryStore _store;
34 private readonly DreamineOptions _opts;
35
44 public string SiteTitle => _opts.SiteTitle;
53 public string SiteDescription => _opts.SiteDescription;
62 public string GitHubOrgUrl => _opts.GitHubOrgUrl;
63
72 public List<LibraryInfo> Libraries { get; private set; } = [];
73
82 public IEnumerable<IGrouping<string, LibraryInfo>> GroupedLibraries =>
83 Libraries.Where(x => x.IsVisible)
84 .OrderBy(x => x.SortOrder)
85 .GroupBy(x => x.Category);
86
112 {
113 _store = store;
114 _opts = opts;
115 }
116
133 public async Task LoadAsync()
134 {
135 Libraries = await _store.GetAllAsync();
136 }
137}
readonly DreamineOptions _opts
HomeViewModel(ILibraryStore store, DreamineOptions opts)
IEnumerable< IGrouping< string, LibraryInfo > > GroupedLibraries