Пример #1
0
 public OutputMessage(MessageId id,
                      SubscriberId source,
                      SubscriberId destination,
                      OutputMessageDetails details)
     :
     this(id, source, destination, details, articles : null, boxes : null)
 {
 }
Пример #2
0
        public static bool Equals(OutputMessage?left, OutputMessage?right)
        {
            bool result = SubscribedMessage.Equals(left, right);

            result &= (result ? OutputMessageDetails.Equals(left?.Details, right?.Details) : false);
            result &= (result ? (left?.Articles.SequenceEqual(right?.Articles)).GetValueOrDefault() : false);
            result &= (result ? (left?.Boxes.SequenceEqual(right?.Boxes)).GetValueOrDefault() : false);

            return(result);
        }
Пример #3
0
 public OutputMessage(OutputRequest request,
                      OutputMessageDetails details)
     :
     this(request.Id,
          request.Destination,
          request.Source,
          details,
          articles : null,
          boxes : null)
 {
 }
Пример #4
0
 public OutputMessage(OutputRequest request,
                      OutputMessageDetails details,
                      IEnumerable <OutputArticle>?articles,
                      IEnumerable <OutputBox>?boxes)
     :
     this(request.Id,
          request.Destination,
          request.Source,
          details,
          articles,
          boxes)
 {
 }
Пример #5
0
        public OutputMessage(MessageId id,
                             SubscriberId source,
                             SubscriberId destination,
                             OutputMessageDetails details,
                             IEnumerable <OutputArticle>?articles,
                             IEnumerable <OutputBox>?boxes)
            :
            base(id, StandardDialogs.Output, source, destination)
        {
            this.Details = details;

            if (articles is not null)
            {
                this.Articles.AddRange(articles);
            }

            if (boxes is not null)
            {
                this.Boxes.AddRange(boxes);
            }
        }