protected virtual DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior)
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<comm.DbDataAdapter.FillSchema|API> {0}, dataSet, schemaType, command, srcTable, behavior={1}", ObjectID, behavior);
try
{
if (null == dataSet)
{
throw ADP.ArgumentNull(nameof(dataSet));
}
if ((SchemaType.Source != schemaType) && (SchemaType.Mapped != schemaType))
{
throw ADP.InvalidSchemaType(schemaType);
}
if (string.IsNullOrEmpty(srcTable))
{
throw ADP.FillSchemaRequiresSourceTableName(nameof(srcTable));
}
if (null == command)
{
throw ADP.MissingSelectCommand(ADP.FillSchema);
}
return (DataTable[])FillSchemaInternal(dataSet, null, schemaType, command, srcTable, behavior);
}
finally
{
DataCommonEventSource.Log.ExitScope(logScopeId);
}
}