查看反射器显示为的 AuthorizedChangeSet 方法
protected virtual bool AuthorizeChangeSet()
{
foreach (ChangeSetEntry entry in this.ChangeSet.ChangeSetEntries)
{
object entity = entry.Entity;
if (entry.DomainOperationEntry != null)
{
this.ValidateMethodPermissions(entry.DomainOperationEntry, entity);
}
if ((entry.EntityActions != null) && entry.EntityActions.Any<KeyValuePair<string, object[]>>())
{
KeyValuePair<string, object[]> pair = entry.EntityActions.Single<KeyValuePair<string, object[]>>();
DomainOperationEntry customMethod = this.ServiceDescription.GetCustomMethod(entity.GetType(), pair.Key);
this.ValidateMethodPermissions(customMethod, entity);
}
}
return !this.ChangeSet.HasError;
}
当它转换为对象时,如何在 foreach 循环中访问实体对象的属性???