我不知道这是否可能,因此这是在黑暗中拍摄的。将对象的引用存储为
总之...
考虑具有以下型号:
Class Model
{
public List<string> TheList = null;
}
列表设置为null的目的。
var model = new Model();
command.RegisterInData(model => model.TheList); // TheList is null at this point
model.TheList = new List<string>();
model.TheList.Add("A value here");
command.Execute(); // <-- Here I want to access the new list somehow
如上所述,我不知道这样的事情是否可能,但我想推向正确的方向。
所需函数:我想告诉命令在我有一个具体的对象之前把结果放在哪里。
在此先感谢
解决了它,但不能发布的答案,直到8小时后,因为我是一个新手...:D –