public TextModel(string name, IFlexibleWordCountModel counts) { SetName(name); SetIncludeQuotes(true); if (counts == null) { throw new ArgumentException("counts must not be null."); } _counts = counts.Copy(); _length = _counts.GetLength(); }
public ITextModel GetTextModel(string name, IFlexibleWordCountModel counts) { if (counts == null) { throw new ArgumentException("Counts model must not be null."); } if (counts.GetLength() < 1) { throw new ArgumentException("Counts model must not have length 0."); } return(new TextModel(name, counts)); }