protected void DiscoverTypes( Assembly assembly )
{
Type[] types = null;
try
{
types = assembly.GetExportedTypes();
}
catch(Exception)
{
// Ok, Dynamic assemblies don't support GetExportedTypes
types = new Type[0];
}
foreach( Type type in types )
{
String nameSpace = type.Namespace;
if (nameSpace == null)
{
continue;
}
Tree.DefineNamespace( nameSpace ).AddType( type );
}
}