Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DefineGlobalMethodNoLock()

MethodBuilder System.Reflection.Emit.ModuleBuilder.DefineGlobalMethodNoLock ( string name,
MethodAttributes attributes,
CallingConventions callingConvention,
Type returnType,
Type[] requiredReturnTypeCustomModifiers,
Type[] optionalReturnTypeCustomModifiers,
Type[] parameterTypes,
Type requiredParameterTypeCustomModifiers[][],
Type optionalParameterTypeCustomModifiers[][] )
inlineprivate

Definition at line 749 of file ModuleBuilder.cs.

750 {
752 {
753 throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated);
754 }
755 if (name == null)
756 {
757 throw new ArgumentNullException("name");
758 }
759 if (name.Length == 0)
760 {
761 throw new ArgumentException(SR.Argument_EmptyName, "name");
762 }
763 if ((attributes & MethodAttributes.Static) == 0)
764 {
765 throw new ArgumentException(SR.Argument_GlobalFunctionHasToBeStatic);
766 }
767 AssemblyBuilder.CheckContext(returnType);
769 AssemblyBuilder.CheckContext(requiredParameterTypeCustomModifiers);
770 AssemblyBuilder.CheckContext(optionalParameterTypeCustomModifiers);
772 }
static int DefineMethod(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, MethodAttributes attributes)

References System.Reflection.Emit.ModuleBuilderData._globalTypeBuilder, System.Reflection.Emit.ModuleBuilderData._hasGlobalBeenCreated, System.Reflection.Emit.ModuleBuilder._moduleData, System.SR.Argument_EmptyName, System.SR.Argument_GlobalFunctionHasToBeStatic, System.Reflection.Emit.AssemblyBuilder.CheckContext(), System.Reflection.Emit.TypeBuilder.DefineMethod(), and System.SR.InvalidOperation_GlobalsHaveBeenCreated.

Referenced by System.Reflection.Emit.ModuleBuilder.DefineGlobalMethod().