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

◆ Create()

static Instruction System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.Create ( string method,
int argCount,
MethodInfo mi )
inlinestaticinherited

Definition at line 131 of file NullableMethodCallInstruction.cs.

132 {
133 switch (method)
134 {
135 case "get_HasValue":
136 return s_hasValue ?? (s_hasValue = new HasValue());
137 case "get_Value":
138 return s_value ?? (s_value = new GetValue());
139 case "Equals":
140 return s_equals ?? (s_equals = new EqualsClass());
141 case "GetHashCode":
142 return s_getHashCode ?? (s_getHashCode = new GetHashCodeClass());
143 case "GetValueOrDefault":
144 if (argCount == 0)
145 {
146 return new GetValueOrDefault(mi);
147 }
148 return s_getValueOrDefault1 ?? (s_getValueOrDefault1 = new GetValueOrDefault1());
149 case "ToString":
150 return s_toString ?? (s_toString = new ToStringClass());
151 default:
153 }
154 }

References System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_equals, System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_getHashCode, System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_getValueOrDefault1, System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_hasValue, System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_toString, System.Linq.Expressions.Interpreter.NullableMethodCallInstruction.s_value, and System.Dynamic.Utils.ContractUtils.Unreachable.

Referenced by System.Linq.Expressions.Interpreter.InstructionList.EmitNullableCall().