Esempio n. 1
0
        public void InsertGrouping(string name, List <string> extensions)
        {
            IEnumerable <Models.FileGrouping> existingGroups = GetGroupingConfig(name);

            if (existingGroups.Count() > 0)
            {
                foreach (var group in existingGroups)
                {
                    group.Extensions.AddRange(extensions.Distinct().Where(ext => !group.Extensions.Contains(ext)));
                    UpdateGrouping(group);
                }
            }
            else
            {
                Models.FileGrouping group = new Models.FileGrouping();
                group.Name = name;
                group.Extensions.AddRange(extensions);
                _groupingConfig.Insert(group);
            }
        }
Esempio n. 2
0
 public void UpdateGrouping(Models.FileGrouping group)
 {
     _groupingConfig.Update(group);
 }