コード例 #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
ファイル: QueamQueser.cs プロジェクト: kysect/Quewer
 public static QueamQueser CreateCreator(Queam queam, Queser queser)
 {
     return(new QueamQueser(queam, queser, QueamQueserRole.Creator));
 }
コード例 #5
0
ファイル: QueamQueser.cs プロジェクト: kysect/Quewer
 public static QueamQueser Create(Queam queam, Queser queser, QueamQueserRole role)
 {
     return(new QueamQueser(queam, queser, role));
 }