public Guard AddViolation(GuardViolation guardViolation) { this.HasViolations = true; this.guardViolations.Add(guardViolation); return(this); }
public static Guard ExtAddViolation(this Guard guard, GuardViolation guardViolation) { return((guard ?? new Guard()).AddViolation(guardViolation)); }