void RegisterLibrary(AssemblyResolver resolver, Hashtable visited, WidgetLibrary lib)
{
if (visited.Contains (lib.Name))
return;
visited [lib.Name] = lib;
foreach (string s in lib.GetLibraryDependencies ()) {
if (!Application.InternalIsWidgetLibrary (resolver, s))
continue;
AddLibrary (resolver, visited, s);
}
try {
Registry.RegisterWidgetLibrary (lib);
} catch (Exception ex) {
// Catch errors when loading a library to avoid aborting
// the whole update method. After all, that's not a fatal
// error (some widgets just won't be shown).
// FIXME: return the error somewhere
Console.WriteLine (ex);
}
}