コード例 #1
0
 public void RemoveApplicationGroup(IApplicationGroup applicationGroup)
 {
     if (!_applicationGroups.Remove(applicationGroup))
     {
         throw new InvalidOperationException("Cannot remove application group from initiative.");
     }
 }
コード例 #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);
        }
コード例 #3
0
 public static ApplicationGroup ToModel(this IApplicationGroup item)
 {
     return(new ApplicationGroup(item.Name, item.Applications.Select(x => x.ToModel())));
 }