.NET 3.5中ExpandoObject的替代品,开销最小

sma*_*man 6 c# runtime dynamic .net-3.5 expandoobject

如何在开销最小的.NET 3.5应用程序中模仿ExpandoObject的功能?到目前为止,我最好的领导是使用Lin Fu框架(http://www.codeproject.com/KB/cs/LinFuPart2.aspx),但我认为可能会有更好的东西.

为了更好地了解我的目标,我的目标是从a的参数动态创建类型MethodInfo.所以,基本上我想转此:

    public class ServiceObject
    {
        public void Execute(string TransformMeIntoAProperty);
    }
Run Code Online (Sandbox Code Playgroud)

    public class ServiceObjectExecuteSignature
    {
        public string TransformMeIntoAProperty{ get; set;}
    }
Run Code Online (Sandbox Code Playgroud)

在运行时.我必须能够使用Reflection访问参数,因为我使用的是Linq表达式.