AddCustomAttribute() приватный Метод

private AddCustomAttribute ( ConstructorInfo con, byte binaryAttribute ) : void
con System.Reflection.ConstructorInfo
binaryAttribute byte
Результат void
Пример #1
0
        private void SetCustomAttributeNoLock(ConstructorInfo con, byte[] binaryAttribute)
        {
            TypeBuilder.DefineCustomAttribute(
                m_manifestModuleBuilder,          // pass in the in-memory assembly module
                AssemblyBuilderData.m_tkAssembly, // This is the AssemblyDef token
                m_manifestModuleBuilder.GetConstructorToken(con).Token,
                binaryAttribute,
                false,
                typeof(System.Diagnostics.DebuggableAttribute) == con.DeclaringType);

            // Track the CA for persistence
            if (m_assemblyData.m_access != AssemblyBuilderAccess.Run)
            {
                // tracking the CAs for persistence
                m_assemblyData.AddCustomAttribute(con, binaryAttribute);
            }
        }