117 references to IsNullableType
System.Linq.Expressions (117)
System\Dynamic\Utils\TypeUtils.cs (8)
22public static Type GetNonNullableType(this Type type) => IsNullableType(type) ? type.GetGenericArguments()[0] : type; 28if (type.IsValueType && !IsNullableType(type)) 46if (!type.IsValueType || IsNullableType(type)) 95Debug.Assert(nullableType.IsNullableType()); 102public static bool IsNullableOrReferenceType(this Type type) => !type.IsValueType || IsNullableType(type); 299if (IsNullableType(source) && AreEquivalent(dest, GetNonNullableType(source))) 304if (IsNullableType(dest) && AreEquivalent(source, GetNonNullableType(dest))) 863IsNullableType(destination) && IsImplicitlyConvertibleTo(GetNonNullableType(source), GetNonNullableType(destination));
System\Linq\Expressions\BinaryExpression.cs (31)
290if (Left.Type.IsNullableType()) 303public bool IsLiftedToNull => IsLifted && Type.IsNullableType(); 344left.IsNullableType() && 611if (left.Type.IsNullableType() && right.Type.IsNullableType()) 616if (method != null && method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 645if (left.Type.IsNullableType() && right.Type.IsNullableType() && 648method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 739return right.IsNullableType() && 740left.IsNullableType() && 755if (paramType.IsNullableType() && !operandType.IsNullableType()) 784? !IsNullConstant(right) && right.Type.IsNullableType() 785: IsNullConstant(right) && left.Type.IsNullableType(); 807if (!(left.IsNullableType() && ParameterIsAssignable(pms[0], left.GetNonNullableType()))) 812if (!(right.IsNullableType() && ParameterIsAssignable(pms[1], right.GetNonNullableType()))) 851if (!(left.IsNullableType() && ParameterIsAssignable(pmsOpTrue[0], left.GetNonNullableType()))) 859right.IsNullableType() && 1059if (left.Type.IsNullableType() && liftToNull) 1076if (left.Type.IsNullableType() && liftToNull) 1229if (left.Type.IsNullableType() && liftToNull) 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; 1387if (left.Type.IsValueType && !left.Type.IsNullableType()) 1426if (left.IsValueType && !left.IsNullableType()) 1430else if (left.IsNullableType() && right.IsImplicitlyConvertibleTo(leftStripped)) 2238if (!left.IsNullableType() && right.IsNullableType())
System\Linq\Expressions\Common\ConstantCheck.cs (1)
84if (operandType.IsValueType && !operandType.IsNullableType())
System\Linq\Expressions\Compiler\ILGen.cs (17)
486if (type.IsNullableType()) 561bool isTypeFromNullable = typeFrom.IsNullableType(); 562bool isTypeToNullable = typeTo.IsNullableType(); 789Debug.Assert(typeFrom.IsNullableType()); 790Debug.Assert(typeTo.IsNullableType()); 823Debug.Assert(!typeFrom.IsNullableType()); 824Debug.Assert(typeTo.IsNullableType()); 833Debug.Assert(typeFrom.IsNullableType()); 834Debug.Assert(!typeTo.IsNullableType()); 844Debug.Assert(typeFrom.IsNullableType()); 845Debug.Assert(!typeTo.IsNullableType()); 859Debug.Assert(typeFrom.IsNullableType()); 868bool isTypeFromNullable = typeFrom.IsNullableType(); 869bool isTypeToNullable = typeTo.IsNullableType(); 881Debug.Assert(nullableType.IsNullableType()); 890Debug.Assert(nullableType.IsNullableType()); 899Debug.Assert(nullableType.IsNullableType());
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (12)
42if (ConstantCheck.IsNull(b.Left) && !ConstantCheck.IsNull(b.Right) && b.Right.Type.IsNullableType()) 47if (ConstantCheck.IsNull(b.Right) && !ConstantCheck.IsNull(b.Left) && b.Left.Type.IsNullableType()) 71Debug.Assert(e.Type.IsNullableType()); 137else if (leftType.IsNullableType() || rightType.IsNullableType()) 150Debug.Assert(!leftType.IsNullableType()); 151Debug.Assert(!rightType.IsNullableType()); 268Debug.Assert(!resultType.IsNullableType()); 289Debug.Assert(leftType.IsNullableType() || rightType.IsNullableType()); 419bool leftIsNullable = leftType.IsNullableType(); 420bool rightIsNullable = rightType.IsNullableType();
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (5)
674if (type.IsNullableType()) 1133if (arg.Type.IsNullableType()) 1162if (resultType.IsNullableType() && !TypeUtils.AreEquivalent(resultType, mc.Type)) 1220if (arg.Type.IsNullableType()) 1266if (resultType.IsNullableType() && !TypeUtils.AreEquivalent(resultType, mc.Type))
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (5)
91if (b.Left.Type.IsNullableType()) 523if (node.Right.Type.IsNullableType()) 537if (node.Left.Type.IsNullableType()) 549else if (node.Left.Type.IsNullableType() || node.Right.Type.IsNullableType())
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (4)
76if (type.IsNullableType()) 122bool operandIsNullable = operandType.IsNullableType(); 141if (resultType.IsNullableType()) 228if (resultType.IsNullableType())
System\Linq\Expressions\ConstantExpression.cs (1)
106if (!type.IsValueType || type.IsNullableType())
System\Linq\Expressions\Interpreter\DefaultValueInstruction.cs (1)
18Debug.Assert(!type.IsNullableType());
System\Linq\Expressions\Interpreter\LightCompiler.cs (15)
966? !IsNullConstant(right) && right.Type.IsNullableType() 967: IsNullConstant(right) && left.Type.IsNullableType(); 1069if (!operandType.IsValueType || operandType.IsNullableType() && node.IsLiftedToNull) 1078if (operandType.IsNullableType() && parameterType.Equals(operandType.GetNonNullableType())) 1123typeTo.IsNullableType() && 1131typeFrom.IsNullableType() && 1168if (typeFrom.IsNullableType() && !typeTo.IsNullableType()) 2179@object.Type.IsNullableType()) 2427if (type.IsNullableType()) 2498(from != null && from.Type.IsNullableType())) 2597if (!hasConversion && node.Left.Type.IsNullableType()) 2605if (!node.Type.IsNullableType()) 2635CompileConvertToType(node.Right.Type, node.Type, isChecked: true, isLiftedToNull: node.Type.IsNullableType()); 2892if (node.Type.IsValueType && !node.Type.IsNullableType())
System\Linq\Expressions\Interpreter\LocalAccess.cs (2)
388frame.Data[_index] = _type.IsNullableType() ? 429value = _type.IsNullableType() ?
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
154Debug.Assert(!mi.ReturnType.IsNullableType()); 288if (t.IsValueType && !t.IsNullableType())
System\Linq\Expressions\SwitchExpression.cs (2)
72if (SwitchValue.Type.IsNullableType()) 230if (!rightOperandType.IsNullableType())
System\Linq\Expressions\TypeBinaryExpression.cs (1)
55if (cType.IsNullableType())
System\Linq\Expressions\UnaryExpression.cs (10)
62bool operandIsNullable = Operand.Type.IsNullableType(); 63bool resultIsNullable = this.Type.IsNullableType(); 77public bool IsLiftedToNull => IsLifted && this.Type.IsNullableType(); 368if (operandType.IsNullableType()) 372if (method != null && method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 393if (operand.Type.IsNullableType() && 395method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 440if ((operand.Type.IsNullableType() || convertToType.IsNullableType()) && 695if (type.IsValueType && !type.IsNullableType())