internal DataTable InstantiateSimpleTable(DataSet dataSet, XmlElement node)
{
string typeName;
XmlAttributeCollection attrs = node.Attributes;
DataTable table;
int minOccurs = 1;
int maxOccurs = 1;
typeName = GetInstanceName(node);
table = dataSet.Tables.GetTable(typeName, _schemaUri);
if (table != null)
{
throw ExceptionBuilder.DuplicateDeclaration(typeName);
}
string tbName = XmlConvert.DecodeName(typeName);
table = new DataTable(tbName);
// fxcop: new DataTable will either inherit the CaseSensitive, Locale from DataSet or be set during SetProperties
table.Namespace = _schemaUri;
GetMinMax(node, ref minOccurs, ref maxOccurs);
table.MinOccurs = minOccurs;
table.MaxOccurs = maxOccurs;
SetProperties(table, attrs);
table._repeatableElement = true;
HandleColumn(node, table);
table.Columns[0].ColumnName = tbName + "_Column";
_ds.Tables.Add(table);
return table;
}
}