示例#1
0
        public void DefaultArguments()
        {
            var handler = new ProcedureHandler(typeof(ProcedureHandlerTest).GetMethod("TestProcedureWithDefaultArg"));

            Assert.AreEqual("42foo", handler.Invoke(new object[] { 42, Type.Missing }));
        }
示例#2
0
        public void SimpleUsage()
        {
            var handler = new ProcedureHandler(typeof(ProcedureHandlerTest).GetMethod("TestProcedure"));

            Assert.AreEqual(3.14159f, handler.Invoke(new object[] { 3, 0.14159f }));
        }