Exemplo n.º 1
0
        public void ReportRuleViolation(object currentObject, ConformanceRule rule)
        {
            BasicProfileViolation v = null;

            foreach (BasicProfileViolation bpv in violations)
            {
                if (bpv.NormativeStatement == rule.NormativeStatement)
                {
                    v = bpv;
                    break;
                }
            }

            if (v == null)
            {
                v = new BasicProfileViolation(checker.Claims, rule);
                violations.Add(v);
            }

            v.Elements.Add(GetDescription(currentObject));
        }
		public void Remove (BasicProfileViolation violation)
		{
			List.Remove (violation);
		}
Exemplo n.º 3
0
		public void ReportRuleViolation (object currentObject, ConformanceRule rule)
		{
			BasicProfileViolation v = null;
			foreach (BasicProfileViolation bpv in violations) {
				if (bpv.NormativeStatement == rule.NormativeStatement) {
					v = bpv;
					break;
				}
			}
			
			if (v == null) {
				v = new BasicProfileViolation (checker.Claims, rule);
				violations.Add (v);
			}
			
			v.Elements.Add (GetDescription (currentObject));
		}
		public void Insert (int index, BasicProfileViolation violation)
		{
			List.Insert (index, violation);
		}
		public int IndexOf (BasicProfileViolation violation)
		{
			return List.IndexOf (violation);
		}
		public void CopyTo (BasicProfileViolation[] array, int index)
		{
			List.CopyTo (array, index);
		}
		public bool Contains (BasicProfileViolation violation)
		{
			return List.Contains (violation);
		}
		public int Add (BasicProfileViolation violation)
		{
			return List.Add (violation);
		}