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


C# SignatureHelper.AddArgument方法代码示例

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


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

示例1: GetMethodSpecSigHelper

 internal static SignatureHelper GetMethodSpecSigHelper(Module scope, Type[] inst)
 {
     SignatureHelper sigHelp = new SignatureHelper(scope, MdSigCallingConvention.GenericInst);
     sigHelp.AddData(inst.Length);
     foreach(Type t in inst)
         sigHelp.AddArgument(t);
     return sigHelp;
 }
开发者ID:kouvel,项目名称:coreclr,代码行数:8,代码来源:SignatureHelper.cs

示例2: GetPropertySigHelper

        /// <include file='doc\SignatureHelper.uex' path='docs/doc[@for="SignatureHelper.GetPropertySigHelper"]/*' />
        public static SignatureHelper GetPropertySigHelper(Module mod, Type returnType, Type[] parameterTypes) 
        {
            SignatureHelper sigHelp;
                
            if (returnType == null)
            {
                returnType = typeof(void);
            }            

            sigHelp = new SignatureHelper(mod, IMAGE_CEE_CS_CALLCONV_PROPERTY, (Type)returnType);
            
            if (parameterTypes != null)
            {
                for (int i=0; i<parameterTypes.Length; i++) 
                {
                    sigHelp.AddArgument(parameterTypes[i]);
                }
            }
            return sigHelp;
        }
开发者ID:ArildF,项目名称:masters,代码行数:21,代码来源:signaturehelper.cs

示例3: GetMethodSigHelper

        internal static SignatureHelper GetMethodSigHelper(
            Module          mod, 
            CallingConventions callingConvention, 
            Type            returnType, 
            Type[]          parameterTypes) 
        {
            SignatureHelper sigHelp;
            int             intCall;
                
            if (returnType == null)
            {
                returnType = typeof(void);
            }            

            intCall = IMAGE_CEE_CS_CALLCONV_DEFAULT;
            if ((callingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
            {
                intCall = IMAGE_CEE_CS_CALLCONV_VARARG;
            }

            if ((callingConvention & CallingConventions.HasThis) == CallingConventions.HasThis)
            {
                intCall |= IMAGE_CEE_CS_CALLCONV_HASTHIS;
            }

            sigHelp = new SignatureHelper(mod, intCall, (Type)returnType);
            
            if (parameterTypes != null)
            {
                for (int i=0; i<parameterTypes.Length; i++) 
                {
                    sigHelp.AddArgument(parameterTypes[i]);
                }
            }
            return sigHelp;
        }
开发者ID:ArildF,项目名称:masters,代码行数:36,代码来源:signaturehelper.cs

示例4: GetMethodSpecSigHelper

 internal static SignatureHelper GetMethodSpecSigHelper(Module scope, Type[] inst)
 {
     SignatureHelper helper = new SignatureHelper(scope, System.Reflection.MdSigCallingConvention.Default | System.Reflection.MdSigCallingConvention.GenericInst);
     helper.AddData(inst.Length);
     foreach (Type type in inst)
     {
         helper.AddArgument(type);
     }
     return helper;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:SignatureHelper.cs

示例5: lock

	// Create a signature helper for a property signature.
	public static SignatureHelper GetPropertySigHelper
				(Module mod, Type returnType, Type[] parameterTypes)
			{
				lock(typeof(AssemblyBuilder))
				{
					// Convert the module into a signature create context.
					IntPtr context = ModuleToContext(mod);

					// Create the basic signature helper.
					IntPtr sig = ClrSigCreateProperty
						(context, CSToILType(mod, context, returnType));
					SignatureHelper helper = new SignatureHelper
						(mod, context, sig);

					// Add the parameters to the helper.
					if(parameterTypes != null)
					{
						foreach(Type type in parameterTypes)
						{
							helper.AddArgument(type);
						}
					}
					return helper;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:26,代码来源:SignatureHelper.cs

示例6: GetMethodSpecSigHelper

 internal static SignatureHelper GetMethodSpecSigHelper(Module scope, Type[] inst)
 {
     SignatureHelper sigHelp = new SignatureHelper(scope, IMAGE_CEE_CS_CALLCONV_GENERICINST);
     sigHelp.AddData(inst.Length);
     foreach(Type t in inst)
         sigHelp.AddArgument(t);
     return sigHelp;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:8,代码来源:signaturehelper.cs


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