【问题标题】:.NET Reflector MSIL.NET 反射器 MSIL
【发布时间】:2013-07-31 02:29:42
【问题描述】:

查看反射器显示为的 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循环中访问实体对象的属性???

【问题讨论】:

    标签: silverlight-4.0 ria reflector


    【解决方案1】:

    仔细阅读,它没有。它只访问条目的成员而不是实体。 另一种选择可能是 ValidateMethodPermissions 使用反射

    【讨论】:

      猜你喜欢
      • 2011-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-09
      • 1970-01-01
      • 2021-11-15
      • 1970-01-01
      相关资源
      最近更新 更多