当前位置: 首页>>代码示例>>C#>>正文


C# CustomAttributeBuilder.CreateCustomAttribute方法代码示例

本文整理汇总了C#中System.Reflection.Emit.CustomAttributeBuilder.CreateCustomAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# CustomAttributeBuilder.CreateCustomAttribute方法的具体用法?C# CustomAttributeBuilder.CreateCustomAttribute怎么用?C# CustomAttributeBuilder.CreateCustomAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Reflection.Emit.CustomAttributeBuilder的用法示例。


在下文中一共展示了CustomAttributeBuilder.CreateCustomAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetCustomAttribute

		// Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
        /// <include file='doc\ParameterBuilder.uex' path='docs/doc[@for="ParameterBuilder.SetCustomAttribute1"]/*' />
        public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
        {
            if (customBuilder == null)
            {
    			throw new ArgumentNullException("customBuilder");
            }
            customBuilder.CreateCustomAttribute((ModuleBuilder) (m_methodBuilder .GetModule()), m_pdToken.Token);
        }
开发者ID:ArildF,项目名称:masters,代码行数:10,代码来源:parameterbuilder.cs

示例2: SetCustomAttribute

 [System.Security.SecuritySafeCritical]  // auto-generated
 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException(nameof(customBuilder));
     }
     Contract.EndContractBlock();
     customBuilder.CreateCustomAttribute((ModuleBuilder) (m_methodBuilder .GetModule()), m_pdToken.Token);
 }
开发者ID:JonHanna,项目名称:coreclr,代码行数:10,代码来源:ParameterBuilder.cs

示例3: SetCustomAttribute

 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException("customBuilder");
     }
     this.m_type.ThrowIfCreated();
     customBuilder.CreateCustomAttribute(this.m_module, this.m_evToken.Token);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:EventBuilder.cs

示例4: SetCustomAttribute

        [System.Security.SecuritySafeCritical]  // auto-generated
        public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
        {
            if (customBuilder == null)
                throw new ArgumentNullException("customBuilder");
            Contract.EndContractBlock();

            customBuilder.CreateCustomAttribute((ModuleBuilder)m_module, m_tdType.Token);
        }
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:typebuilder.cs

示例5: SetCustomAttribute

 [System.Security.SecuritySafeCritical]  // auto-generated
 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException(nameof(customBuilder));
     }
     Contract.EndContractBlock();
     m_type.ThrowIfCreated();
     customBuilder.CreateCustomAttribute(m_module, m_evToken.Token);
 }
开发者ID:Clockwork-Muse,项目名称:coreclr,代码行数:11,代码来源:EventBuilder.cs

示例6: SetCustomAttribute

 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     ThrowIfGeneric ();
     
     if (customBuilder == null)
         throw new ArgumentNullException("customBuilder");
     
     customBuilder.CreateCustomAttribute((ModuleBuilder)m_module, MetadataTokenInternal);
     
     if (IsKnownCA(customBuilder.m_con))
         ParseCA(customBuilder.m_con, customBuilder.m_blob);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:12,代码来源:methodbuilder.cs

示例7: SetCustomAttributeNoLock

        [System.Security.SecurityCritical]  // auto-generated
        private void SetCustomAttributeNoLock(CustomAttributeBuilder customBuilder)
        {
            customBuilder.CreateCustomAttribute(
                m_manifestModuleBuilder, 
                AssemblyBuilderData.m_tkAssembly);          // This is the AssemblyDef token 

            // Track the CA for persistence
            if (m_assemblyData.m_access != AssemblyBuilderAccess.Run)
            {
                m_assemblyData.AddCustomAttribute(customBuilder);
            }
        }
开发者ID:ChuangYang,项目名称:coreclr,代码行数:13,代码来源:AssemblyBuilder.cs

示例8: SetCustomAttribute

       // Use this function if client wishes to build CustomAttribute using CustomAttributeBuilder
        /// <include file='doc\ModuleBuilder.uex' path='docs/doc[@for="ModuleBuilder.SetCustomAttribute1"]/*' />
        
        public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
        {
            CodeAccessPermission.DemandInternal(PermissionType.ReflectionEmit);
            if (customBuilder == null)
            {
                throw new ArgumentNullException("customBuilder");
            }

            customBuilder.CreateCustomAttribute(this, 1);   // This is hard coding the module token to 1
        }
开发者ID:ArildF,项目名称:masters,代码行数:13,代码来源:modulebuilder.cs

示例9: SetCustomAttribute

 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException("customBuilder");
     }
     this.ThrowIfGeneric();
     customBuilder.CreateCustomAttribute(this.m_module, this.MetadataTokenInternal);
     if (this.IsKnownCA(customBuilder.m_con))
     {
         this.ParseCA(customBuilder.m_con, customBuilder.m_blob);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:MethodBuilder.cs

示例10: SetCustomAttributeNoLock

 private void SetCustomAttributeNoLock(CustomAttributeBuilder customBuilder)
 {
     customBuilder.CreateCustomAttribute(this.m_manifestModuleBuilder, 0x20000001);
     if (this.m_assemblyData.m_access != AssemblyBuilderAccess.Run)
     {
         this.m_assemblyData.AddCustomAttribute(customBuilder);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:AssemblyBuilder.cs

示例11: SetCustomAttribute

 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException("customBuilder");
     }
     this.m_typeBuilder.ThrowIfCreated();
     ModuleBuilder module = this.m_typeBuilder.Module as ModuleBuilder;
     customBuilder.CreateCustomAttribute(module, this.m_tkField.Token);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:FieldBuilder.cs

示例12: SetCustomAttribute

 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException("customBuilder");
     }
     customBuilder.CreateCustomAttribute(this, 1);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ModuleBuilder.cs

示例13: SetCustomAttribute

        public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
        {
            ThrowIfGeneric();
            
            if (customBuilder == null)
                throw new ArgumentNullException("customBuilder");

            customBuilder.CreateCustomAttribute((ModuleBuilder)m_module, m_tdType.Token);
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:9,代码来源:typebuilder.cs

示例14: SetCustomAttribute

 [System.Security.SecuritySafeCritical]  // auto-generated
 public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
 {
     if (customBuilder == null)
     {
         throw new ArgumentNullException("customBuilder");
     }
     m_containingType.ThrowIfCreated();
     customBuilder.CreateCustomAttribute(m_moduleBuilder, m_prToken.Token);
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:10,代码来源:PropertyBuilder.cs

示例15: SetCustomAttribute

        [System.Security.SecuritySafeCritical]  // auto-generated
        public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
        {
            if (customBuilder == null)
                throw new ArgumentNullException("customBuilder");
            Contract.EndContractBlock();

            m_typeBuilder.ThrowIfCreated();

            ModuleBuilder module = m_typeBuilder.Module as ModuleBuilder;

            customBuilder.CreateCustomAttribute(module, m_tkField.Token);
        }
开发者ID:l1183479157,项目名称:coreclr,代码行数:13,代码来源:FieldBuilder.cs


注:本文中的System.Reflection.Emit.CustomAttributeBuilder.CreateCustomAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。