public static void Refresh(Module module) {
if (module == null) {
return;
}
ArrayList list = null;
lock(cachedComponentEntries) {
foreach (Type curType in cachedComponentEntries.Keys) {
if (curType.Module.Equals(module)) {
if (list == null) {
list = new ArrayList();
}
list.Add(curType);
}
}
// now remove all the ones we tagged -- can't do this
// in the enumeration.
//
if (list != null) {
foreach(Type t in list) {
cachedComponentEntries.Remove(t);
}
}
}
if (list != null) {
// Clear the attribute cache. It's not that expensive to build
// this back up if we need to.
//
lock(attributeCache) {
attributeCache.Clear();
}
RefreshEventHandler handler = refreshHandler;
if (handler != null) {
foreach(Type curType in list) {
handler(new RefreshEventArgs(curType));
}
}
}
}