// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException(nameof(customBuilder));
     }
     customBuilder.CreateCustomAttribute((ModuleBuilder)(_methodBuilder.GetModule()), _token.Token);
 }
示例#2
0
 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException(nameof(customBuilder));
     }
     m_type.ThrowIfCreated();
     customBuilder.CreateCustomAttribute(m_module, m_evToken.Token);
 }
示例#3
0
 private void SetCustomAttributeNoLock(CustomAttributeBuilder customBuilder)
 {
     customBuilder.CreateCustomAttribute(_manifestModuleBuilder, AssemblyBuilderData.AssemblyDefToken);
 }