public bool Equals(NotificationMessage other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return _template.Equals(other._template) && Accessors.IsEqualTo(other.Accessors);
        }
Пример #2
0
        public bool Equals(NotificationMessage other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return Equals(other.GetMessage(), GetMessage()) && Accessors.IsEqualTo(other.Accessors);
        }
Пример #3
0
        public void Validate(long count, ValidationContext context)
        {
            if (count <= 0) return;

            var message = new NotificationMessage(FastPackKeys.FIELD_MUST_BE_UNIQUE);
            _properties.Each(p => message.AddAccessor(new SingleProperty(p)));

            context.Notification.RegisterMessage(message);
        }
Пример #4
0
        public NotificationMessage Prepend(Accessor accessor)
        {
            var prependedAccessors = _accessors.Select(x => x.Prepend(accessor)).ToList();
            var message = new NotificationMessage(StringToken, _messageSubstitutions);
            message._accessors.AddRange(prependedAccessors);

            return message;
        }
Пример #5
0
 public bool Contains(NotificationMessage message)
 {
     return _messages.Contains(message);
 }
Пример #6
0
 public void Add(NotificationMessage message)
 {
     _messages.Add(message);
 }
        public NotificationMessage Prepend(Accessor accessor)
        {
            var prependedAccessors = _accessors.Select(x => x.Prepend(accessor)).ToList();
            var message = new NotificationMessage(StringToken, _template.Values.ToArray());
            message._accessors.AddRange(prependedAccessors);

            return message;
        }