System.ComponentModel.DebugTypeDescriptor.Refresh C# (CSharp) Method

Refresh() public static method

public static Refresh ( Module module ) : void
module System.Reflection.Module
return void
        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));
                    }
                }
            }
        }
        

Same methods

DebugTypeDescriptor::Refresh ( Assembly assembly ) : void
DebugTypeDescriptor::Refresh ( Type type ) : void
DebugTypeDescriptor::Refresh ( object component ) : void