Esempio n. 1
0
        public MainViewModel(
            NavbarViewModel navbarVm,
            BucketsViewModel bucketsVm,
            SettingsViewModel settingsVm,
            HelpViewModel helpVm)
        {
            NavbarVm = navbarVm ?? throw new ArgumentNullException(nameof(navbarVm));

            _vms = new List <IViewModel>
            {
                bucketsVm,
                settingsVm,
                helpVm
            };
        }
        public BucketsViewModel Adapt(IBuckets buckets)
        {
            var result = new BucketsViewModel(buckets.CommPlayers.OrderBy(x => x.Name.Trim()), buckets.BestPlayers.OrderBy(x => x.Name.Trim()), buckets.BetterPlayers.OrderBy(x => x.Name.Trim()), buckets.GoodPlayers.OrderBy(x => x.Name.Trim()));

            return(result);
        }