Επεξεργασία

Κοινή χρήση μέσω


ModuleBuilder.DefineGlobalMethodCore Method

Definition

When overridden in a derived class, defines a global method with the specified name, attributes, calling convention, return type, custom modifiers for the return type, parameter types, and custom modifiers for the parameter types.

protected:
 abstract System::Reflection::Emit::MethodBuilder ^ DefineGlobalMethodCore(System::String ^ name, System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
protected abstract System.Reflection.Emit.MethodBuilder DefineGlobalMethodCore (string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);
abstract member DefineGlobalMethodCore : string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.MethodBuilder
Protected MustOverride Function DefineGlobalMethodCore (name As String, attributes As MethodAttributes, callingConvention As CallingConventions, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As MethodBuilder

Parameters

name
String

The name of the method. name cannot contain embedded null characters.

attributes
MethodAttributes

A bitwise combination of the enumeration values that specifies the attributes of the method. The attributes must include Static.

callingConvention
CallingConventions

The calling convention for the method.

returnType
Type

The return type of the method.

requiredReturnTypeCustomModifiers
Type[]

An array of types representing the required custom modifiers for the return type.

optionalReturnTypeCustomModifiers
Type[]

An array of types representing the optional custom modifiers for the return type.

parameterTypes
Type[]

The types of the method's parameters.

requiredParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding parameter of the global method.

optionalParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding parameter of the global method.

Returns

The defined global method.

Applies to