Пример #1
0
        /// <inheritdoc/>
        protected override void InitializeSecurityAttributes()
        {
            var gpContext = new GenericParamContext();
            var tmp       = DeclSecurityReader.Read(readerModule, permissionSet, gpContext);

            Interlocked.CompareExchange(ref securityAttributes, tmp, null);
        }
Пример #2
0
 /// <summary>
 /// Reads a <c>DeclSecurity</c> blob
 /// </summary>
 /// <param name="module">Module that will own the returned list</param>
 /// <param name="signature"><c>DeclSecurity</c> stream that will be owned by us</param>
 /// <param name="gpContext">Generic parameter context</param>
 /// <returns>A list of <see cref="SecurityAttribute"/>s</returns>
 public static ThreadSafe.IList <SecurityAttribute> Read(ModuleDef module, IBinaryReader signature, GenericParamContext gpContext)
 {
     using (var reader = new DeclSecurityReader(module, signature, gpContext))
         return(reader.Read());
 }