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

◆ Unbox()

static UnaryExpression System.Linq.Expressions.Expression< TDelegate >.Unbox ( Expression< TDelegate > expression,
Type type )
inlinestaticinherited

Definition at line 5264 of file Expression.cs.

5265 {
5268 if (!expression.Type.IsInterface && expression.Type != typeof(object))
5269 {
5270 throw Error.InvalidUnboxType("expression");
5271 }
5272 if (!type.IsValueType)
5273 {
5274 throw Error.InvalidUnboxType("type");
5275 }
5276 TypeUtils.ValidateType(type, "type");
5277 return new UnaryExpression(ExpressionType.Unbox, expression, type, null);
5278 }
static void RequiresNotNull(object value, string paramName)
static void RequiresCanRead(Expression expression, string paramName)
static void ValidateType(Type type, string paramName)
Definition TypeUtils.cs:695

References System.Linq.Expressions.Error.InvalidUnboxType(), System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.type, and System.Dynamic.Utils.TypeUtils.ValidateType().