Exemplo n.º 1
0
        public static void RunDelegate4()
        {
            NormalTestModel model = new NormalTestModel();
            var             func  = NDomain.Create("NDomain4").Action <NormalTestModel>("obj.Age=1;");

            func(model);
            Assert.Equal(1, model.Age);
        }
Exemplo n.º 2
0
        public static void RunDelegate5()
        {
            NormalTestModel model = new NormalTestModel();
            var             func  = NDomain.Create("NDomain5").Action <NormalTestModel, int>("arg1.Age=arg2;");

            func(model, 1);
            Assert.Equal(1, model.Age);
        }
Exemplo n.º 3
0
        public static void RunDelegate6()
        {
            NormalTestModel model = new NormalTestModel();
            var             func  = NDomain.Create("NDomain6").Action <NormalTestModel, int, int>("arg1.Age=arg2+arg3;");

            func(model, 1, 2);
            Assert.Equal(3, model.Age);
        }
Exemplo n.º 4
0
        public static int RunDelegate6()
        {
            NormalTestModel model = new NormalTestModel();
            var             func  = NDomain.Create("NDomain6").Action <NormalTestModel, int, int>("arg1.Age=arg2+arg3;");

            func(model, 1, 2);
            func.DisposeDomain();
            return(model.Age);
        }