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

◆ MethodBuilder()

System.Reflection.Emit.MethodBuilder.MethodBuilder ( string name,
MethodAttributes attributes,
CallingConventions callingConvention,
Type returnType,
Type[] returnTypeRequiredCustomModifiers,
Type[] returnTypeOptionalCustomModifiers,
Type[] parameterTypes,
Type parameterTypeRequiredCustomModifiers[][],
Type parameterTypeOptionalCustomModifiers[][],
ModuleBuilder mod,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type )
inlinepackage

Definition at line 157 of file MethodBuilder.cs.

158 {
159 if (name == null)
160 {
161 throw new ArgumentNullException("name");
162 }
163 if (name.Length == 0)
164 {
165 throw new ArgumentException(SR.Argument_EmptyName, "name");
166 }
167 if (name[0] == '\0')
168 {
169 throw new ArgumentException(SR.Argument_IllegalName, "name");
170 }
171 if (mod == null)
172 {
173 throw new ArgumentNullException("mod");
174 }
175 if (parameterTypes != null)
176 {
177 foreach (Type type2 in parameterTypes)
178 {
179 if (type2 == null)
180 {
181 throw new ArgumentNullException("parameterTypes");
182 }
183 }
184 }
185 m_strName = name;
186 m_module = mod;
188 m_returnType = returnType ?? typeof(void);
189 if ((attributes & MethodAttributes.Static) == 0)
190 {
191 callingConvention |= CallingConventions.HasThis;
192 }
193 else if ((attributes & MethodAttributes.Virtual) != 0 && (attributes & MethodAttributes.Abstract) == 0)
194 {
195 throw new ArgumentException(SR.Arg_NoStaticVirtual);
196 }
197 m_callingConvention = callingConvention;
198 if (parameterTypes != null)
199 {
200 m_parameterTypes = new Type[parameterTypes.Length];
201 Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length);
202 }
203 else
204 {
205 m_parameterTypes = null;
206 }
207 m_returnTypeRequiredCustomModifiers = returnTypeRequiredCustomModifiers;
208 m_returnTypeOptionalCustomModifiers = returnTypeOptionalCustomModifiers;
209 m_parameterTypeRequiredCustomModifiers = parameterTypeRequiredCustomModifiers;
210 m_parameterTypeOptionalCustomModifiers = parameterTypeOptionalCustomModifiers;
211 m_iAttributes = attributes;
212 m_bIsBaked = false;
213 m_fInitLocals = true;
214 m_localSymInfo = new LocalSymInfo();
215 m_ubBody = null;
216 m_ilGenerator = null;
217 m_dwMethodImplFlags = MethodImplAttributes.IL;
218 }
MethodImplAttributes m_dwMethodImplFlags
readonly MethodAttributes m_iAttributes
readonly CallingConventions m_callingConvention

References System.SR.Arg_NoStaticVirtual, System.SR.Argument_EmptyName, System.SR.Argument_IllegalName, System.Array.Copy(), System.Reflection.Emit.MethodBuilder.m_bIsBaked, System.Reflection.Emit.MethodBuilder.m_callingConvention, System.Reflection.Emit.MethodBuilder.m_containingType, System.Reflection.Emit.MethodBuilder.m_dwMethodImplFlags, System.Reflection.Emit.MethodBuilder.m_fInitLocals, System.Reflection.Emit.MethodBuilder.m_iAttributes, System.Reflection.Emit.MethodBuilder.m_ilGenerator, System.Reflection.Emit.MethodBuilder.m_localSymInfo, System.Reflection.Emit.MethodBuilder.m_module, System.Reflection.Emit.MethodBuilder.m_parameterTypeOptionalCustomModifiers, System.Reflection.Emit.MethodBuilder.m_parameterTypeRequiredCustomModifiers, System.Reflection.Emit.MethodBuilder.m_parameterTypes, System.Reflection.Emit.MethodBuilder.m_returnType, System.Reflection.Emit.MethodBuilder.m_returnTypeOptionalCustomModifiers, System.Reflection.Emit.MethodBuilder.m_returnTypeRequiredCustomModifiers, System.Reflection.Emit.MethodBuilder.m_strName, System.Reflection.Emit.MethodBuilder.m_ubBody, and System.type.

Referenced by System.Reflection.Emit.MethodBuilder.Equals().