public TaskWorker(TaskParameters p, Type t, string mf, string sf, object target) { TaskParams = p; MainFunctionName = mf; SecondFunctionName = sf; classType = t; this.target = target; }
public double FunctionSet(double t, Vector y, int index, TaskParameters tp) { object res = classType.InvokeMember(SecondFunctionName, BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Static, null, target, new object[] { t, y, tp[index] }); return((double)res); }
public Vector AbstractFunction(double t, Vector y, TaskParameters tps) { object res = classType.InvokeMember(MainFunctionName, BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Static, null, target, new object[] { t, y, tps }); return(res as Vector); }