NVelocity.Runtime.VelocimacroManager.DumpNamespace C# (CSharp) Method

DumpNamespace() public method

Removes the VMs and the namespace from the manager. Used when a template is reloaded to avoid accumulating drek
public DumpNamespace ( String ns ) : bool
ns String namespace to dump ///
return bool
        public bool DumpNamespace(String ns)
        {
            lock(this)
            {
                if (UsingNamespaces(ns))
                {
                    Object temp_key;
                    Hashtable temp_hashtable;
                    temp_key = ns;
                    temp_hashtable = namespaceHash;
                    Hashtable h = (Hashtable) temp_hashtable[temp_key];
                    temp_hashtable.Remove(temp_key);

                    if (h == null)
                        return false;

                    h.Clear();

                    return true;
                }

                return false;
            }
        }