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


C# SignatureHelper.AddArguments方法代码示例

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


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

示例1: GetMethodSigHelper

        internal static SignatureHelper GetMethodSigHelper(
            Module scope, CallingConventions callingConvention, int cGenericParam,
            Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers,
            Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
        {
            SignatureHelper sigHelp;
            MdSigCallingConvention intCall;
                
            if (returnType == null)
            {
                returnType = typeof(void);
            }            

            intCall = MdSigCallingConvention.Default;

            if ((callingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
                intCall = MdSigCallingConvention.Vararg;

            if (cGenericParam > 0)
            {
                intCall |= MdSigCallingConvention.Generic;
            }

            if ((callingConvention & CallingConventions.HasThis) == CallingConventions.HasThis)
                intCall |= MdSigCallingConvention.HasThis;

            sigHelp = new SignatureHelper(scope, intCall, cGenericParam, returnType, 
                                            requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);            
            sigHelp.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);

            return sigHelp;
        }
开发者ID:kouvel,项目名称:coreclr,代码行数:32,代码来源:SignatureHelper.cs

示例2: GetPropertySigHelper

        public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention,
            Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, 
            Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
        {
            SignatureHelper sigHelp;
                
            if (returnType == null)
            {
                returnType = typeof(void);
            }            

            MdSigCallingConvention intCall = MdSigCallingConvention.Property;

            if ((callingConvention & CallingConventions.HasThis) == CallingConventions.HasThis)
                intCall |= MdSigCallingConvention.HasThis;

            sigHelp = new SignatureHelper(mod, intCall, 
                returnType, requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);
            sigHelp.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);

            return sigHelp;
        }
开发者ID:kouvel,项目名称:coreclr,代码行数:22,代码来源:SignatureHelper.cs

示例3: GetPropertySigHelper

 public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
 {
     if (returnType == null)
     {
         returnType = typeof(void);
     }
     System.Reflection.MdSigCallingConvention convention = System.Reflection.MdSigCallingConvention.Default | System.Reflection.MdSigCallingConvention.Property;
     if ((callingConvention & CallingConventions.HasThis) == CallingConventions.HasThis)
     {
         convention = (System.Reflection.MdSigCallingConvention) ((byte) (convention | (System.Reflection.MdSigCallingConvention.Default | System.Reflection.MdSigCallingConvention.HasThis)));
     }
     SignatureHelper helper = new SignatureHelper(mod, convention, returnType, requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);
     helper.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);
     return helper;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:SignatureHelper.cs

示例4: GetMethodSigHelper

 internal static SignatureHelper GetMethodSigHelper(Module scope, CallingConventions callingConvention, int cGenericParam, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
 {
     if (returnType == null)
     {
         returnType = typeof(void);
     }
     System.Reflection.MdSigCallingConvention convention = System.Reflection.MdSigCallingConvention.Default;
     if ((callingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
     {
         convention = System.Reflection.MdSigCallingConvention.C | System.Reflection.MdSigCallingConvention.FastCall;
     }
     if (cGenericParam > 0)
     {
         convention = (System.Reflection.MdSigCallingConvention) ((byte) (convention | (System.Reflection.MdSigCallingConvention.Default | System.Reflection.MdSigCallingConvention.Generic)));
     }
     if ((callingConvention & CallingConventions.HasThis) == CallingConventions.HasThis)
     {
         convention = (System.Reflection.MdSigCallingConvention) ((byte) (convention | (System.Reflection.MdSigCallingConvention.Default | System.Reflection.MdSigCallingConvention.HasThis)));
     }
     SignatureHelper helper = new SignatureHelper(scope, convention, cGenericParam, returnType, requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);
     helper.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);
     return helper;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:23,代码来源:SignatureHelper.cs

示例5: GetPropertySigHelper

        public static SignatureHelper GetPropertySigHelper(Module mod, 
            Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, 
            Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
        {
            SignatureHelper sigHelp;
                
            if (returnType == null)
            {
                returnType = typeof(void);
            }            

            sigHelp = new SignatureHelper(mod, IMAGE_CEE_CS_CALLCONV_PROPERTY, 
                returnType, requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);
            sigHelp.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);

            return sigHelp;
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:17,代码来源:signaturehelper.cs

示例6: GetMethodSigHelper

        internal static SignatureHelper GetMethodSigHelper(
            Module scope, CallingConventions callingConvention, int cGenericParam,
            Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers,
            Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
        {
            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 (cGenericParam > 0)
            {
                intCall |= IMAGE_CEE_CS_CALLCONV_GENERIC;
            }

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

            sigHelp = new SignatureHelper(scope, intCall, cGenericParam, returnType, 
                                            requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);            
            sigHelp.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);

            return sigHelp;
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:32,代码来源:signaturehelper.cs


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