/// <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());
     }
 }
        /// <inheritdoc/>
        protected override void InitializeSecurityAttributes()
        {
            var gpContext = new GenericParamContext();
            var tmp       = DeclSecurityReader.Read(readerModule, permissionSet, gpContext);

            Interlocked.CompareExchange(ref securityAttributes, tmp, null);
        }
Example #3
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>
 /// <returns>A list of <see cref="SecurityAttribute"/>s</returns>
 public static ThreadSafe.IList<SecurityAttribute> Read(ModuleDef module, IBinaryReader signature)
 {
     using (var reader = new DeclSecurityReader(module, signature))
         return reader.Read();
 }
Example #4
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();
		}
Example #5
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 IList <SecurityAttribute> Read(ModuleDef module, DataReader signature, GenericParamContext gpContext)
        {
            var reader = new DeclSecurityReader(module, signature, gpContext);

            return(reader.Read());
        }