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

◆ EmitNonNullableToNullableConversion()

static void System.Linq.Expressions.Compiler.ILGen.EmitNonNullableToNullableConversion ( this ILGenerator il,
Type typeFrom,
Type typeTo,
bool isChecked,
ILocalCache locals )
inlinestaticprivate

Definition at line 678 of file ILGen.cs.

679 {
680 Type nonNullableType = typeTo.GetNonNullableType();
681 il.EmitConvertToType(typeFrom, nonNullableType, isChecked, locals);
682 ConstructorInfo nullableConstructor = TypeUtils.GetNullableConstructor(typeTo);
683 il.Emit(OpCodes.Newobj, nullableConstructor);
684 }
static ConstructorInfo GetNullableConstructor(Type nullableType)
Definition TypeUtils.cs:34
static readonly OpCode Newobj
Definition OpCodes.cs:233

References System.Reflection.Emit.ILGenerator.Emit(), System.Dynamic.Utils.TypeUtils.GetNullableConstructor(), and System.Reflection.Emit.OpCodes.Newobj.