示例#1
0
 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);
 }
示例#2
0
        public void InvokeFunctionDelegate1(FunctionDelegate1 func)
        {
            int result = func("Bullseye");

            Debug.Assert(result == 10245);
        }
示例#3
0
 public CustomFunction(string name, FunctionDelegate1 function)
 {
     _name = name;
     _calculate1 = function;
     _argumentCount = 1;
 }