Exemple #1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="ishost">True if this member is a host</param>
        /// <param name="isdone">Is the group member done.</param>
        /// <param name="group">Group members of this group</param>
        public GroupMember(bool ishost, bool isdone, global::BackendModel.Group group)
        {
            // NOTE: This class has one-to-one associations with GroupMember.
            // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.

            this.IsHost = ishost;

            this.IsDone = isdone;

            if (group == null)
            {
                throw new ArgumentNullException(nameof(group));
            }
            this.Group = group;
            group.GroupMembers.Add(this);

            Init();
        }
Exemple #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="ishost">True if this member is a host</param>
 /// <param name="isdone">Is the group member done.</param>
 /// <param name="group">Group members of this group</param>
 public static GroupMember Create(bool ishost, bool isdone, global::BackendModel.Group group)
 {
     return(new GroupMember(ishost, isdone, group));
 }