示例#1
0
 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();
 }
示例#2
0
 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));
 }