public static SprintUser SprintGebruiker(User gebruiker, Sprint sprint, SprintRole sprintRol)
 {
     SprintUser sprintGebruiker = new SprintUser(gebruiker, sprint, sprintRol);
     Project project = Project();
     project.AddSprint(sprint);
     return Persist(sprintGebruiker);
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SprintUser"/> class for the given user, sprint and role.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <param name="sprint">The sprint.</param>
        /// <param name="role">The role.</param>
        public SprintUser(User user, Sprint sprint, SprintRole role)
        {
            if (user == null)
                throw new ArgumentNullException("user", "The user can not be null.");
            if (sprint == null)
                throw new ArgumentNullException("sprint", "The sprint can not be null.");

            user.AddSprintUser(this);
            sprint.AddSprintUser(this);
            this.sprintRole = role;
        }
Esempio n. 3
0
 /// <summary>
 /// Removes the given role from the current set of roles.
 /// </summary>
 /// <param name="role">The role.</param>
 public virtual void RemoveRole(SprintRole role)
 {
     sprintRole &= ~role;
 }
Esempio n. 4
0
 /// <summary>
 /// Determines if this sprintuser has the given sprintrole
 /// </summary>
 /// <param name="role">The role.</param>
 /// <returns></returns>
 public virtual bool HasSprintRole(SprintRole role)
 {
     return ((sprintRole & role) != 0);
 }
Esempio n. 5
0
 /// <summary>
 /// Determines if this sprintuser has EXACTLY the same sprintrole as the given role
 /// </summary>
 /// <param name="role">The role.</param>
 /// <returns></returns>
 public virtual bool HasExactlyThisSprintRole(SprintRole role)
 {
     return (sprintRole == role);
 }
Esempio n. 6
0
 /// <summary>
 /// Adds the given sprintrole to the current set of sprintroles.
 /// </summary>
 /// <param name="role">The role.</param>
 public virtual void AddRole(SprintRole role)
 {
     this.sprintRole |= role;
 }