예제 #1
0
        public UserGroupMembership MakeMemberOf(Guid userGroupGuid)
        {
            if (IsMemberOf(userGroupGuid))
            {
                throw new Exception("Already a member of ..."); // TODO ***
            }

            var ug = new UserGroup(Context);

            ug.Guid = userGroupGuid;
            ug.Load();

            var ugm = new UserGroupMembership(this);

            ugm.Name      = ug.Name;
            ugm.UserGroup = ug;
            ugm.Save();

            return(ugm);
        }
예제 #2
0
 /// <summary>
 /// Creates a deep copy of the passed object.
 /// </summary>
 /// <param name="old">A <b>Slice</b> object to create the deep copy from.</param>
 private void CopyMembers(UserGroupMembership old)
 {
 }
예제 #3
0
 /// <summary>
 /// Copy contructor for doing deep copy of the <b>Slice</b> objects.
 /// </summary>
 /// <param name="old">The <b>Slice</b> to copy from.</param>
 public UserGroupMembership(UserGroupMembership old)
     : base(old)
 {
     CopyMembers(old);
 }
예제 #4
0
 /// <summary>
 /// Copy contructor for doing deep copy of the <b>Slice</b> objects.
 /// </summary>
 /// <param name="old">The <b>Slice</b> to copy from.</param>
 public UserGroupMembership(UserGroupMembership old)
     : base(old)
 {
     CopyMembers(old);
 }
예제 #5
0
 /// <summary>
 /// Creates a deep copy of the passed object.
 /// </summary>
 /// <param name="old">A <b>Slice</b> object to create the deep copy from.</param>
 private void CopyMembers(UserGroupMembership old)
 {
 }