Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CastToEnumInstruction.cs
Go to the documentation of this file.
1
namespace
System.Linq.Expressions.Interpreter
;
2
3
internal
sealed
class
CastToEnumInstruction
:
CastInstruction
4
{
5
private
readonly
Type
_t
;
6
7
public
CastToEnumInstruction
(
Type
t)
8
{
9
_t
= t;
10
}
11
12
public
override
int
Run
(
InterpretedFrame
frame)
13
{
14
object
obj
= frame.
Pop
();
15
frame.
Push
((
obj
==
null
) ?
null
:
Enum
.
ToObject
(
_t
,
obj
));
16
return
1;
17
}
18
}
System.Enum.ToObject
static object ToObject(Type enumType, object value)
Definition
Enum.cs:874
System.Enum
Definition
Enum.cs:14
System.Linq.Expressions.Interpreter.CastInstruction
Definition
CastInstruction.cs:6
System.Linq.Expressions.Interpreter.CastToEnumInstruction.Run
override int Run(InterpretedFrame frame)
Definition
CastToEnumInstruction.cs:12
System.Linq.Expressions.Interpreter.CastToEnumInstruction._t
readonly Type _t
Definition
CastToEnumInstruction.cs:5
System.Linq.Expressions.Interpreter.CastToEnumInstruction.CastToEnumInstruction
CastToEnumInstruction(Type t)
Definition
CastToEnumInstruction.cs:7
System.Linq.Expressions.Interpreter.CastToEnumInstruction
Definition
CastToEnumInstruction.cs:4
System.Linq.Expressions.Interpreter.InterpretedFrame.Pop
object Pop()
Definition
InterpretedFrame.cs:90
System.Linq.Expressions.Interpreter.InterpretedFrame.Push
void Push(object value)
Definition
InterpretedFrame.cs:55
System.Linq.Expressions.Interpreter.InterpretedFrame
Definition
InterpretedFrame.cs:7
System.Type
Definition
Type.cs:14
System.Linq.Expressions.Interpreter
Definition
ActionCallInstruction.cs:3
System.ExceptionArgument.obj
@ obj
source
System.Linq.Expressions
System.Linq.Expressions.Interpreter
CastToEnumInstruction.cs
Generated by
1.10.0