public BusinessObject(SetOfData <SomeType> setofdata) { // an example of some validation if (setofdata.count > Threshold) { throw new InvalidOperationException("Set data must be above treshold"); } }
public BusinessObject Build(SetOfData<SomeType> setofdata) { // an example of some validation if (validator.IsValid(setofdata)) return new BusinessObject(setofdata); }