Beispiel #1
0
 public object this[int rowIndex, string columnName]
 {
     get
     {
         object entity = rows[rowIndex];
         return(DynamicClass.GetValue(entity, columnName));
     }
 }
Beispiel #2
0
        public void AssignValue()
        {
            AssignClassVarExpression cmd = new AssignClassVarExpression("one", new ConstantExpression(1));
            DynamicClass             cls = new DynamicClass(null);
            DynamicObject            obj = new DynamicObject(cls);
            Context context = new Context(obj, null);

            var result = cmd.Evaluate(context);

            Assert.AreEqual(1, result);
            Assert.AreEqual(1, cls.GetValue("one"));
        }