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);
        }
        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);
        }
        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);
        }
        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;
        }
Beispiel #5
0
 public bool Contains(NotificationMessage message)
 {
     return _messages.Contains(message);
 }
Beispiel #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;
        }