117 references to GetNonNullableType
System.Linq.Expressions (117)
System\Dynamic\Utils\TypeUtils.cs (20)
104public static bool IsBool(this Type type) => GetNonNullableType(type) == typeof(bool); 108type = GetNonNullableType(type); 133type = GetNonNullableType(type); 155type = GetNonNullableType(type); 171type = GetNonNullableType(type); 193type = GetNonNullableType(type); 210type = GetNonNullableType(type); 299if (IsNullableType(source) && AreEquivalent(dest, GetNonNullableType(source))) 304if (IsNullableType(dest) && AreEquivalent(source, GetNonNullableType(dest))) 315&& (GetNonNullableType(dest) != typeof(bool) 331Type nnSourceType = GetNonNullableType(source); 332Type nnDestType = GetNonNullableType(dest); 593type = GetNonNullableType(type); 674Type nnType = GetNonNullableType(left); 689Type nnExprType = GetNonNullableType(convertFrom); 690Type nnConvType = GetNonNullableType(convertToType); 863IsNullableType(destination) && IsImplicitlyConvertibleTo(GetNonNullableType(source), GetNonNullableType(destination)); 973internal static bool IsUnsigned(this Type type) => IsUnsigned(GetNonNullableType(type).GetTypeCode()); 991internal static bool IsFloatingPoint(this Type type) => IsFloatingPoint(GetNonNullableType(type).GetTypeCode());
System\Linq\Expressions\BinaryExpression.cs (20)
346TypeUtils.AreEquivalent(method.ReturnType, left.GetNonNullableType()); 613Type nnLeftType = left.Type.GetNonNullableType(); 614Type nnRightType = right.Type.GetNonNullableType(); 646ParameterIsAssignable(pms[0], left.Type.GetNonNullableType()) && 647ParameterIsAssignable(pms[1], right.Type.GetNonNullableType()) && 722Type nnLeftType = leftType.GetNonNullableType(); 723Type nnRightType = rightType.GetNonNullableType(); 807if (!(left.IsNullableType() && ParameterIsAssignable(pms[0], left.GetNonNullableType()))) 812if (!(right.IsNullableType() && ParameterIsAssignable(pms[1], right.GetNonNullableType()))) 825left = left.GetNonNullableType(); 851if (!(left.IsNullableType() && ParameterIsAssignable(pmsOpTrue[0], left.GetNonNullableType()))) 860TypeUtils.AreEquivalent(pms[1].ParameterType, right.GetNonNullableType()); 1057left.Type.GetNonNullableType().IsEnum)) 1288returnType = (left.Type.IsNullableType() && TypeUtils.AreEquivalent(method.ReturnType, left.Type.GetNonNullableType())) ? left.Type : method.ReturnType; 1294returnType = (left.Type.IsNullableType() && TypeUtils.AreEquivalent(method.ReturnType, left.Type.GetNonNullableType())) ? left.Type : method.ReturnType; 1341returnType = (left.Type.IsNullableType() && method.ReturnType == left.Type.GetNonNullableType()) ? left.Type : method.ReturnType; 1347returnType = (left.Type.IsNullableType() && method.ReturnType == left.Type.GetNonNullableType()) ? left.Type : method.ReturnType; 1415if (!ParameterIsAssignable(pms[0], left.Type.GetNonNullableType()) && 1425Type leftStripped = left.GetNonNullableType(); 2233&& right.GetNonNullableType() == typeof(int);
System\Linq\Expressions\Common\ConstantCheck.cs (2)
70Type nnOperandType = operandType.GetNonNullableType(); 71Type nnTestType = testType.GetNonNullableType();
System\Linq\Expressions\Compiler\ILGen.cs (8)
379switch (type.GetNonNullableType().GetTypeCode()) 488Type nonNullType = type.GetNonNullableType(); 564Type nnExprType = typeFrom.GetNonNullableType(); 565Type nnType = typeTo.GetNonNullableType(); 803Type nnTypeFrom = typeFrom.GetNonNullableType(); 804Type nnTypeTo = typeTo.GetNonNullableType(); 825Type nnTypeTo = typeTo.GetNonNullableType(); 852Type nnTypeFrom = typeFrom.GetNonNullableType();
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (9)
97ParameterExpression p1 = Expression.Variable(b.Left.Type.GetNonNullableType(), name: null); 98ParameterExpression p2 = Expression.Variable(b.Right.Type.GetNonNullableType(), name: null); 118Debug.Assert(TypeUtils.AreReferenceAssignable(p1.Type, b.Left.Type.GetNonNullableType())); 119Debug.Assert(TypeUtils.AreReferenceAssignable(p2.Type, b.Right.Type.GetNonNullableType())); 367Type unnullable = type.GetNonNullableType(); 410Type unnullable = type.GetNonNullableType(); 479Type resultNonNullableType = resultType.GetNonNullableType(); 481EmitBinaryOperator(op, leftType.GetNonNullableType(), rightType.GetNonNullableType(), resultNonNullableType, liftedToNull: false);
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (2)
1114Debug.Assert(TypeUtils.AreEquivalent(resultType.GetNonNullableType(), mc.Type.GetNonNullableType()));
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (1)
123Type nnLeftType = b.Left.Type.GetNonNullableType();
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (3)
90Type nnType = type.GetNonNullableType(); 163Type nnOperandType = resultType.GetNonNullableType(); 354ParameterExpression v = Expression.Variable(node.Operand.Type.GetNonNullableType(), name: null);
System\Linq\Expressions\Interpreter\AddInstruction.cs (2)
166return type.GetNonNullableType().GetTypeCode() switch 302return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\AndInstruction.cs (1)
175type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\DecrementInstruction.cs (1)
158return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\DivInstruction.cs (1)
166return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\EqualInstruction.cs (3)
514switch (type.GetNonNullableType().GetTypeCode()) 528Debug.Assert(type.GetNonNullableType().GetTypeCode() == TypeCode.Double); 534switch (type.GetNonNullableType().GetTypeCode())
System\Linq\Expressions\Interpreter\ExclusiveOrInstruction.cs (1)
163type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\GreaterThanInstruction.cs (2)
282return type.GetNonNullableType().GetTypeCode() switch 300return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\GreaterThanOrEqualInstruction.cs (2)
282return type.GetNonNullableType().GetTypeCode() switch 300return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\IncrementInstruction.cs (1)
158return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\LeftShiftInstruction.cs (1)
163type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\LessThanInstruction.cs (2)
281return type.GetNonNullableType().GetTypeCode() switch 299return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\LessThanOrEqualInstruction.cs (2)
282return type.GetNonNullableType().GetTypeCode() switch 300return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\LightCompiler.cs (9)
1078if (operandType.IsNullableType() && parameterType.Equals(operandType.GetNonNullableType())) 1124typeTo.GetNonNullableType().Equals(typeFrom)) 1132typeFrom.GetNonNullableType().Equals(typeTo)) 1139Type nonNullableFrom = typeFrom.GetNonNullableType(); 1140Type nonNullableTo = typeTo.GetNonNullableType(); 2607typeToCompare = typeToCompare.GetNonNullableType(); 2654Type nnLeftType = node.Left.Type.GetNonNullableType(); 2910_instructions.EmitLoad(node.TypeOperand.GetNonNullableType()); 2954_instructions.EmitLoad(node.TypeOperand.GetNonNullableType());
System\Linq\Expressions\Interpreter\ModuloInstruction.cs (1)
166return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\MulInstruction.cs (2)
166return type.GetNonNullableType().GetTypeCode() switch 303return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\NegateInstruction.cs (2)
107return type.GetNonNullableType().GetTypeCode() switch 183return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\NotEqualInstruction.cs (3)
496switch (type.GetNonNullableType().GetTypeCode()) 510Debug.Assert(type.GetNonNullableType().GetTypeCode() == TypeCode.Double); 516switch (type.GetNonNullableType().GetTypeCode())
System\Linq\Expressions\Interpreter\NotInstruction.cs (1)
172type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\OrInstruction.cs (1)
178return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\RightShiftInstruction.cs (1)
164return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\Interpreter\SubInstruction.cs (2)
166return type.GetNonNullableType().GetTypeCode() switch 302return type.GetNonNullableType().GetTypeCode() switch
System\Linq\Expressions\SwitchExpression.cs (2)
211liftedCall = ParameterIsAssignable(leftParam, switchValue.Type.GetNonNullableType()); 234rightOperandType = rightOperandType.GetNonNullableType();
System\Linq\Expressions\TypeBinaryExpression.cs (5)
60if (cType.GetNonNullableType() != TypeOperand.GetNonNullableType()) 73return Expression.Block(Expression, Utils.Constant(cType == TypeOperand.GetNonNullableType())); 133Expression.Constant(TypeOperand.GetNonNullableType(), typeof(Type)) 148return Utils.Constant(TypeOperand.GetNonNullableType() == ce.Value.GetType());
System\Linq\Expressions\UnaryExpression.cs (4)
361Type nnOperandType = operandType.GetNonNullableType(); 394ParameterIsAssignable(pms[0], operand.Type.GetNonNullableType()) && 441ParameterIsAssignable(pms[0], operand.Type.GetNonNullableType()) && 442(TypeUtils.AreEquivalent(method.ReturnType, convertToType.GetNonNullableType()) ||