public void ValuesInFunction() { ICommand body = new PassCommand(); DefinedFunction func = new DefinedFunction("foo", null, body, null); func.SetValue("__doc__", "foo function"); Assert.IsFalse(func.HasValue("bar")); Assert.IsTrue(func.HasValue("__doc__")); Assert.AreEqual("foo function", func.GetValue("__doc__")); }
public void GetAndUseDelegate() { ICommand body = new PassCommand(); DefinedFunction func = new DefinedFunction("foo", null, body, null); var type = typeof(ThreadStart); // Activator.CreateInstance(typeof(ThreadStart), func.DoFunction); }