mercredi 9 septembre 2015

Dynamic Code Execution Ignores Method Results

I have a class generated , compiled and executed dynamically.

The dynamic class has a property to which an object(Autozen) is supplied.

The object properties work fine and are printed by dynamic class. But the method outputs are not.

here is the dynamic class code

using System;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Collections.Generic;
using SkillBuilder.AutoGens.Libs;

namespace SkillBuilder.AutoGens.Libs
{
    public class MyClass
    {
        public MyClass()
        {}

        public Autozen ag {get;set;}

        public virtual string TransformText()
        {
            StringBuilder sb = new StringBuilder();
            var temp="";
        temp=ag.Autodata.title;   // this works fine
        sb.Append(temp);

        temp=ag.Autodata.Pagenm;  //so is this
        sb.Append(temp);

        temp=ag.GetJqGridColDefMaster(); 
        sb.Append(temp);    // this one does not work, and is empty
        return sb.ToString();

        }
    }
}

The Method GetJqGridColDefMaster() gets hit and returns value too. But my dynamic class is ignoring the method result.

Can anybody tell me what am i missing here ?

thanks





Aucun commentaire:

Enregistrer un commentaire