Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ConstructorBuilder.cs
Go to the documentation of this file.
3
5
7{
8 private readonly MethodBuilder m_methodBuilder;
9
11
13
14 public override Module Module => m_methodBuilder.Module;
15
17
19
20 public override string Name => m_methodBuilder.Name;
21
23
25
26 public override CallingConventions CallingConvention
27 {
28 get
29 {
31 {
32 return CallingConventions.HasThis;
33 }
34 return CallingConventions.Standard;
35 }
36 }
37
38 public bool InitLocals
39 {
40 get
41 {
43 }
44 set
45 {
46 m_methodBuilder.InitLocals = value;
47 }
48 }
49
50 internal ConstructorBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers, ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type)
51 {
52 m_methodBuilder = new MethodBuilder(name, attributes, callingConvention, null, null, null, parameterTypes, requiredCustomModifiers, optionalCustomModifiers, mod, type);
53 type.m_listMethods.Add(m_methodBuilder);
55 int metadataToken = m_methodBuilder.MetadataToken;
56 }
57
58 internal ConstructorBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type)
59 : this(name, attributes, callingConvention, parameterTypes, null, null, mod, type)
60 {
61 }
62
63 internal override Type[] GetParameterTypes()
64 {
66 }
67
68 [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
70 {
72 }
73
78
79 public override string ToString()
80 {
82 }
83
84 public override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
85 {
87 }
88
89 public override ParameterInfo[] GetParameters()
90 {
92 return constructor.GetParameters();
93 }
94
99
100 public override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
101 {
103 }
104
105 public override object[] GetCustomAttributes(bool inherit)
106 {
107 return m_methodBuilder.GetCustomAttributes(inherit);
108 }
109
110 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
111 {
112 return m_methodBuilder.GetCustomAttributes(attributeType, inherit);
113 }
114
115 public override bool IsDefined(Type attributeType, bool inherit)
116 {
117 return m_methodBuilder.IsDefined(attributeType, inherit);
118 }
119
120 public ParameterBuilder DefineParameter(int iSequence, ParameterAttributes attributes, string? strParamName)
121 {
122 attributes &= ~ParameterAttributes.ReservedMask;
123 return m_methodBuilder.DefineParameter(iSequence, attributes, strParamName);
124 }
125
134
135 public ILGenerator GetILGenerator(int streamSize)
136 {
138 {
140 }
141 return m_methodBuilder.GetILGenerator(streamSize);
142 }
143
144 internal override Type GetReturnType()
145 {
147 }
148
149 public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
150 {
151 m_methodBuilder.SetCustomAttribute(con, binaryAttribute);
152 }
153
155 {
156 m_methodBuilder.SetCustomAttribute(customBuilder);
157 }
158
160 {
162 }
163}
override object[] GetCustomAttributes(bool inherit)
override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
void SetImplementationFlags(MethodImplAttributes attributes)
override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture)
override bool IsDefined(Type attributeType, bool inherit)
void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
ConstructorBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type)
override object[] GetCustomAttributes(Type attributeType, bool inherit)
ConstructorBuilder(string name, MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers, ModuleBuilder mod, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TypeBuilder type)
override RuntimeMethodHandle MethodHandle
ParameterBuilder DefineParameter(int iSequence, ParameterAttributes attributes, string? strParamName)
void SetCustomAttribute(CustomAttributeBuilder customBuilder)
override MethodImplAttributes GetMethodImplementationFlags()
void SetImplementationFlags(MethodImplAttributes attributes)
override RuntimeMethodHandle MethodHandle
void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
override MethodAttributes Attributes
ParameterBuilder DefineParameter(int position, ParameterAttributes attributes, string? strParamName)
override MethodImplAttributes GetMethodImplementationFlags()
override bool IsDefined(Type attributeType, bool inherit)
override object[] GetCustomAttributes(bool inherit)
byte[] InternalGetSignature(out int length)
static ConstructorInfo GetConstructor(Type type, ConstructorInfo constructor)
ParameterInfo[] GetParameters()
static string InvalidOperation_DefaultConstructorILGen
Definition SR.cs:1436
static string NotSupported_DynamicModule
Definition SR.cs:1672
Definition SR.cs:7
virtual bool IsGenericType
Definition Type.cs:111