예제 #1
0
        public IList <BuildEntity> GetFilteredApps()
        {
            var builds = _commonNameBuildsProvider.GetBuilds().OrderBy(x => x.Name).ToList();

            var whitelist = _whitelistHandler.Provider.Get();

            FillAdditionalData(builds, whitelist);

            var cleanList = GetBuildsToClean();

            builds.ForEach(x => x.CleanerMark = cleanList.FirstOrDefault(c => c.Name == x.Name) != null);

            var notes = new NoteHelper().GetAll();

            builds.ForEach(x => x.Note = notes.FirstOrDefault(n => n.BuildName == x.Name)?.Note);

            return(builds);
        }
예제 #2
0
        public bool ToggleWhitelistForBuild(string name)
        {
            var builds = _commonNameBuildsProvider.GetBuilds().FirstOrDefault(x => x.Name == name)?.Apps.Select(x => x.Name).ToList();

            return(_whitelistHandler.Provider.Toggle(builds));
        }