Exemple #1
0
 public void AddCustomFunction(string name, FunctionDelegate2 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 InvokeFunctionDelegate2(FunctionDelegate2 func)
        {
            int result = func(101, "Birdshot");

            Debug.Assert(result == 17654);
        }
Exemple #3
0
 public CustomFunction(string name, FunctionDelegate2 function)
 {
     _name = name;
     _calculate2 = function;
     _argumentCount = 2;
 }