Ejemplo n.º 1
0
        public BrokenField Add(string field, string message, params string[] args)
        {
            var text = string.Format(message, args);
            var item = new BrokenField(field, text);

            this.Fields.Add(item);
            return(item);
        }
Ejemplo n.º 2
0
        public BrokenRule(string message, Dictionary <string, string> fields)
            : this(message)
        {
            IEnumerable <BrokenField> result = new BrokenField[0];

            if (fields != null && fields.Any())
            {
                result = from i in fields
                         select new BrokenField(i.Key, i.Value);
            }

            this.Fields = result.ToList();
        }