コード例 #1
0
        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__"));
        }
コード例 #2
0
        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);
        }