Beispiel #1
0
        internal IList <CustomAttributeData> GetDeclarativeSecurity(int metadataToken)
        {
            List <CustomAttributeData> list = new List <CustomAttributeData>();

            foreach (int i in DeclSecurity.Filter(metadataToken))
            {
                CustomAttributeData.ReadDeclarativeSecurity(this, i, list);
            }
            return(list);
        }
Beispiel #2
0
        internal IList <CustomAttributeData> GetDeclarativeSecurity(int metadataToken)
        {
            List <CustomAttributeData> list = new List <CustomAttributeData>();

            // TODO use binary search?
            for (int i = 0; i < DeclSecurity.records.Length; i++)
            {
                if (DeclSecurity.records[i].Parent == metadataToken)
                {
                    int action        = DeclSecurity.records[i].Action;
                    int permissionSet = DeclSecurity.records[i].PermissionSet;
                    CustomAttributeData.ReadDeclarativeSecurity(this.Assembly, list, action, GetBlob(permissionSet));
                }
            }
            return(list);
        }