public TableInfo(
IList<ColumnInfo> columns,
IdentifierStrategy identifierStrategy,
string name,
string schema)
{
if (columns == null)
{
throw new ArgumentNullException("columns");
}
if (name == null)
{
throw new ArgumentNullException("name");
}
this.columns = new ReadOnlyCollection<ColumnInfo>(columns);
this.identifierStrategy = identifierStrategy;
this.name = name;
this.schema = schema;
this.identifierColumn = columns.FirstOrDefault(c => c.IsIdentifier);
this.insertColumnCount = columns.Count(c => c.AllowInsert);
this.updateColumnCount = columns.Count(c => c.AllowUpdate);
this.ValidateColumns();
}