本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}