public void RegisterFunction(IPluginFunction function) { foreach (var func in function.GetRegisteredFunctions()) { string name = string.Format("{0}.{1}", function.GetClassName(), func.Name); _sortedListFunctionInfo.Add(name, func); } _sortedListPluginFunction.Add(function.GetClassName(), function); }
private static void Callback(IPluginFunction func, Type[] types, object[] objects) { int[] args = new int[types.Length]; for (int i = 0; i < types.Length; i++) { args[i] = GetSP(types[i], objects[i]); } func.CallFunction(args); }
private static void Callback <T1, T2, T3, T4, T5, T6, T7, T8>(IPluginFunction func, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8) { Callback(func, new [] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, new object[] { value1, value2, value3, value4, value5, value6, value7, value8 }); }
private static void Callback <T1, T2, T3, T4, T5>(IPluginFunction func, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5) { Callback(func, new [] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, new object[] { value1, value2, value3, value4, value5 }); }
private static void Callback <T1, T2, T3>(IPluginFunction func, T1 value1, T2 value2, T3 value3) { Callback(func, new [] { typeof(T1), typeof(T2), typeof(T3) }, new object[] { value1, value2, value3 }); }
private static void Callback <T1>(IPluginFunction func, T1 value1) { Callback(func, new [] { typeof(T1) }, new object[] { value1 }); }