public void AddCustomFunction(string name, FunctionDelegate1 function) { string lowername = name.ToLower(); if (m_Functions.ContainsKey(lowername)) throw new FunctionAlreadyDefinedException("Function " + name + " already defined!"); m_Functions[lowername] = new CustomFunction(lowername, function); }
public void InvokeFunctionDelegate1(FunctionDelegate1 func) { int result = func("Bullseye"); Debug.Assert(result == 10245); }
public CustomFunction(string name, FunctionDelegate1 function) { _name = name; _calculate1 = function; _argumentCount = 1; }