private ScriptInfoCollection ParseCollection(ScriptInfoCollection config)
{
if (config.Contains("*"))
{
using (
IDbCommand cmd =
database.CreateCommand(
"Select Object_Name(object_id) as TableName From sys.objects Where type='U'"))
{
cmd.CommandType = CommandType.Text;
using (IDataReader reader = database.ExecuteReader(cmd))
{
ScriptInfoCollection collection = new ScriptInfoCollection();
while (reader.Read())
{
collection.Add(
new ScriptInfo((string)reader["TableName"], string.Empty, config["*"].ScriptMode));
}
return collection;
}
}
}
else
{
return config;
}
}