Esempio n. 1
0
 public void RemoveApplicationGroup(IApplicationGroup applicationGroup)
 {
     if (!_applicationGroups.Remove(applicationGroup))
     {
         throw new InvalidOperationException("Cannot remove application group from initiative.");
     }
 }
Esempio n. 2
0
        public void AddApplicationGroup(IApplicationGroup applicationGroup)
        {
            if (_applicationGroups.Any(x => string.Compare(x.Name, applicationGroup.Name, StringComparison.InvariantCultureIgnoreCase) == 0))
            {
                throw new InvalidOperationException("There is already an application group with this name in this initiative.");
            }

            _applicationGroups.Add(applicationGroup);
        }
Esempio n. 3
0
 public static ApplicationGroup ToModel(this IApplicationGroup item)
 {
     return(new ApplicationGroup(item.Name, item.Applications.Select(x => x.ToModel())));
 }