예제 #1
0
 public Que(Guid id, string title, DateTime creationTimeUtc, bool allowMoreThanOneActivePush, Queam queam, List <QueQueamQueser> queQueamQuesers)
 {
     Id                         = id;
     Title                      = title;
     CreationTimeUtc            = creationTimeUtc;
     AllowMoreThanOneActivePush = allowMoreThanOneActivePush;
     Queam                      = queam;
     QueQueamQuesers            = queQueamQuesers;
 }
예제 #2
0
        public QueQueamQueser Push(Queser queser, string comment)
        {
            QueamQueser queamQueser = Queam.FindMember(queser) ?? throw QuewerException.IsNotQueamMember();

            if (!AllowMoreThanOneActivePush && QueQueamQuesers.Any(qqq => qqq.QueamQueser.Id == queamQueser.Id))
            {
                throw QuewerException.MemberAlreadyInQue();
            }

            var queQueamQueser = QueQueamQueser.Create(this, queamQueser, comment);

            QueQueamQuesers.Add(queQueamQueser);
            return(queQueamQueser);
        }
예제 #3
0
 public Que(Queam queam, string title, bool allowMoreThanOnePush = false)
     : this(Guid.NewGuid(), title, DateTime.UtcNow, allowMoreThanOnePush, queam, new List <QueQueamQueser>())
 {
 }
예제 #4
0
 public static QueamQueser CreateCreator(Queam queam, Queser queser)
 {
     return(new QueamQueser(queam, queser, QueamQueserRole.Creator));
 }
예제 #5
0
 public static QueamQueser Create(Queam queam, Queser queser, QueamQueserRole role)
 {
     return(new QueamQueser(queam, queser, role));
 }