internal static void Validate(ListaItemManualOutput toValidate, IList validated) { if (validated.Contains(toValidate)) { return; } validated.Add(toValidate); if (toValidate.ListItens == null || toValidate.ListItens.Count == 0) { throw new ArgumentException("ListItens is required, at least one value must be present"); } foreach (Item it in toValidate.ListItens) { it.Validate(validated); } }
public static void Validate(ListaItemManualOutput toValidate) { Validate(toValidate, new ArrayList()); }