private void FormGLSwtichType_Load(object sender, EventArgs e)
{
List<Type> typeList;
if (this.forceReload)
{
typeList = this.baseType.GetAllDerivedTypes(this.addtionalFilter);
if (dict.ContainsKey(this.baseType))
{ dict[this.baseType] = typeList; }
else
{ dict.Add(this.baseType, typeList); }
}
else
{
if (dict.ContainsKey(this.baseType))
{ typeList = dict[this.baseType]; }
else
{
typeList = this.baseType.GetAllDerivedTypes(this.addtionalFilter);
dict.Add(this.baseType, typeList);
}
}
foreach (Type item in typeList)
{
this.lstType.Items.Add(item);
}
}