public void Validate(object target, Notification notification)
        {
            if (!_match.Matches(target))
            {
                return;
            }

            var attribute = new GreaterThanZeroAttribute();
            attribute.Property = _property.InnerProperty;
            attribute.Validate(target, notification);
        }
Пример #2
0
        public static Notification Invalid()
        {
            var returnValue = new Notification();
            returnValue.RegisterMessage("something", "something else", Severity.Error);

            return returnValue;
        }
Пример #3
0
 public void Include(Notification peer)
 {
     _list.AddRange(peer.AllMessages);
 }
Пример #4
0
        public Notification Flatten()
        {
            var list = new List<NotificationMessage>();
            gather(list);

            var returnValue = new Notification();
            returnValue._list.AddRange(list);

            return returnValue;
        }