NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ModuleBuilder.DefineGlobalMethod (String, MethodAttributes, CallingConventions, Type, Type[])

Defines a global method given its name, attributes, calling convention, return type, and parameter types.

[Visual Basic]
Overloads Public Function DefineGlobalMethod( _
   ByVal name As String, _
   ByVal attributes As MethodAttributes, _
   ByVal callingConvention As CallingConventions, _
   ByVal returnType As Type, _
   ByVal parameterTypes() As Type _
) As MethodBuilder
[C#]
public MethodBuilder DefineGlobalMethod(
   string name,
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type returnType,
   Type[] parameterTypes
);
[C++]
public: MethodBuilder* DefineGlobalMethod(
   String* name,
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type* returnType,
   Type* parameterTypes[]
);
[JScript]
public function DefineGlobalMethod(
   name : String,
   attributes : MethodAttributes,
   callingConvention : CallingConventions,
   returnType : Type,
   parameterTypes : Type[]
) : MethodBuilder;

Parameters

name
The name of the method.
attributes
[To be supplied.]
callingConvention
[To be supplied.]
returnType
[To be supplied.]
parameterTypes
[To be supplied.]

Return Value

Returns the defined global method.

Exceptions

Exception Type Condition
ArgumentException if the method is not static
ArgumentNullException if name is a null reference (in Visual Basic Nothing)
InvalidOperationException if CreateGlobalFunctions has been previously called

Requirements

NGWS Runtime Security:

ReflectionPermission SecurityAction.Demand, ReflectionEmit

See Also

ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace | ModuleBuilder.DefineGlobalMethod Overload List