Esempio n. 1
0
        public void RemoveChildGroup(UserGroup group)
        {
            if (!children.Contains(group))
            {
                throw new InvalidOperationException("The user group is not a child of this parent");
            }

            children.Remove(group);
            group.Parent = null;
        }
Esempio n. 2
0
        public void AddChildGroup(UserGroup group)
        {
            if (children.Contains(group))
            {
                throw new InvalidOperationException("The user group already belongs to this parent");
            }

            children.Add(group);
            group.Parent = this;
        }