{\r
// Stores a list of the loaded function types so we can instantiate them as needed\r
static readonly Dictionary<string, Type> functions = new Dictionary<string, Type>(StringComparer.InvariantCultureIgnoreCase);\r
+ // Only class name. Last in wins.\r
+ static readonly Dictionary<string, Type> shortFunctions = new Dictionary<string, Type>(StringComparer.InvariantCultureIgnoreCase);\r
\r
#region Load/Unload\r
\r
if (shouldLoad) {\r
Log.WriteLine(LogLevel.Notice, "Function {0} loaded.", t.FullName);\r
functions.Add(t.FullName, t);\r
+ shortFunctions[t.Name] = t;\r
}\r
else {\r
Log.WriteLine(LogLevel.Notice, "Function {0} requested not to be loaded.", t.FullName);\r
{\r
Type t;\r
if (!functions.TryGetValue(fullName, out t) || !t.IsSubclassOf(typeof(TFunction))) {\r
- Log.WriteLine(LogLevel.Error, "Could not find function {0}.", fullName);\r
- return null;\r
+ if (!shortFunctions.TryGetValue(fullName, out t) || !t.IsSubclassOf(typeof(TFunction))) {\r
+ Log.WriteLine(LogLevel.Error, "Could not find function {0}.", fullName);\r
+ return null;\r
+ }\r
}\r
return t;\r
}\r