public FCraftCriterion([NotNull] FCraftCriterion other) { if (other == null) { throw new ArgumentNullException(nameof(other)); } FromRank = other.FromRank; ToRank = other.ToRank; Condition = other.Condition; }
/// <summary> Adds a new criterion to the list. Throws an ArgumentException on duplicates. </summary> public static void Add([NotNull] FCraftCriterion criterion) { if (criterion == null) { throw new ArgumentNullException(nameof(criterion)); } if (Criteria.Contains(criterion)) { throw new ArgumentException("This criterion has already been added."); } Criteria.Add(criterion); }