protected Switch(string displayName, string description, string defaultSwitchValue)
{
// displayName is used as a hashtable key, so it can never
// be null.
if (displayName == null) displayName = string.Empty;
_displayName = displayName;
_description = description;
// Add a weakreference to this switch and cleanup invalid references
lock (s_switches)
{
_pruneCachedSwitches();
s_switches.Add(new WeakReference(this));
}
_defaultValue = defaultSwitchValue;
}