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

◆ Create()

static Instruction System.Linq.Expressions.Interpreter.EqualInstruction.Create ( Type type,
bool liftedToNull )
inlinestaticinherited

Definition at line 556 of file EqualInstruction.cs.

557 {
558 if (liftedToNull)
559 {
560 return type.GetNonNullableType().GetTypeCode() switch
561 {
562 TypeCode.Boolean => s_BooleanLiftedToNull ?? (s_BooleanLiftedToNull = new EqualBooleanLiftedToNull()),
563 TypeCode.SByte => s_SByteLiftedToNull ?? (s_SByteLiftedToNull = new EqualSByteLiftedToNull()),
564 TypeCode.Int16 => s_Int16LiftedToNull ?? (s_Int16LiftedToNull = new EqualInt16LiftedToNull()),
565 TypeCode.Char => s_CharLiftedToNull ?? (s_CharLiftedToNull = new EqualCharLiftedToNull()),
566 TypeCode.Int32 => s_Int32LiftedToNull ?? (s_Int32LiftedToNull = new EqualInt32LiftedToNull()),
567 TypeCode.Int64 => s_Int64LiftedToNull ?? (s_Int64LiftedToNull = new EqualInt64LiftedToNull()),
568 TypeCode.Byte => s_ByteLiftedToNull ?? (s_ByteLiftedToNull = new EqualByteLiftedToNull()),
569 TypeCode.UInt16 => s_UInt16LiftedToNull ?? (s_UInt16LiftedToNull = new EqualUInt16LiftedToNull()),
570 TypeCode.UInt32 => s_UInt32LiftedToNull ?? (s_UInt32LiftedToNull = new EqualUInt32LiftedToNull()),
571 TypeCode.UInt64 => s_UInt64LiftedToNull ?? (s_UInt64LiftedToNull = new EqualUInt64LiftedToNull()),
572 TypeCode.Single => s_SingleLiftedToNull ?? (s_SingleLiftedToNull = new EqualSingleLiftedToNull()),
573 _ => s_DoubleLiftedToNull ?? (s_DoubleLiftedToNull = new EqualDoubleLiftedToNull()),
574 };
575 }
576 return type.GetNonNullableType().GetTypeCode() switch
577 {
578 TypeCode.Boolean => s_Boolean ?? (s_Boolean = new EqualBoolean()),
579 TypeCode.SByte => s_SByte ?? (s_SByte = new EqualSByte()),
580 TypeCode.Int16 => s_Int16 ?? (s_Int16 = new EqualInt16()),
581 TypeCode.Char => s_Char ?? (s_Char = new EqualChar()),
582 TypeCode.Int32 => s_Int32 ?? (s_Int32 = new EqualInt32()),
583 TypeCode.Int64 => s_Int64 ?? (s_Int64 = new EqualInt64()),
584 TypeCode.Byte => s_Byte ?? (s_Byte = new EqualByte()),
585 TypeCode.UInt16 => s_UInt16 ?? (s_UInt16 = new EqualUInt16()),
586 TypeCode.UInt32 => s_UInt32 ?? (s_UInt32 = new EqualUInt32()),
587 TypeCode.UInt64 => s_UInt64 ?? (s_UInt64 = new EqualUInt64()),
588 TypeCode.Single => s_Single ?? (s_Single = new EqualSingle()),
589 TypeCode.Double => s_Double ?? (s_Double = new EqualDouble()),
590 _ => s_reference ?? (s_reference = new EqualReference()),
591 };
592 }

References System.Linq.Expressions.Interpreter.EqualInstruction.s_Boolean, System.Linq.Expressions.Interpreter.EqualInstruction.s_BooleanLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Byte, System.Linq.Expressions.Interpreter.EqualInstruction.s_ByteLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Char, System.Linq.Expressions.Interpreter.EqualInstruction.s_CharLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Double, System.Linq.Expressions.Interpreter.EqualInstruction.s_DoubleLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int16, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int16LiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int32, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int32LiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int64, System.Linq.Expressions.Interpreter.EqualInstruction.s_Int64LiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_reference, System.Linq.Expressions.Interpreter.EqualInstruction.s_SByte, System.Linq.Expressions.Interpreter.EqualInstruction.s_SByteLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_Single, System.Linq.Expressions.Interpreter.EqualInstruction.s_SingleLiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt16, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt16LiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt32, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt32LiftedToNull, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt64, System.Linq.Expressions.Interpreter.EqualInstruction.s_UInt64LiftedToNull, and System.type.

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