67 references to ITypeSymbolHelpers
Microsoft.CodeAnalysis (64)
Operations\ControlFlowGraphBuilder.cs (62)
2180
if (
ITypeSymbolHelpers
.IsBooleanType(operation.Type) &&
2181
ITypeSymbolHelpers
.IsBooleanType(operation.LeftOperand.Type) &&
2182
ITypeSymbolHelpers
.IsBooleanType(operation.RightOperand.Type))
2188
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.Type) &&
2189
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.LeftOperand.Type) &&
2190
ITypeSymbolHelpers
.IsNullableOfBoolean(operation.RightOperand.Type))
2195
else if (
ITypeSymbolHelpers
.IsObjectType(operation.Type) &&
2196
ITypeSymbolHelpers
.IsObjectType(operation.LeftOperand.Type) &&
2197
ITypeSymbolHelpers
.IsObjectType(operation.RightOperand.Type))
2201
else if (
ITypeSymbolHelpers
.IsDynamicType(operation.Type) &&
2202
(
ITypeSymbolHelpers
.IsDynamicType(operation.LeftOperand.Type) ||
2203
ITypeSymbolHelpers
.IsDynamicType(operation.RightOperand.Type)))
2275
ITypeSymbolHelpers
.IsBooleanType(operation.Type) &&
2276
ITypeSymbolHelpers
.IsBooleanType(operation.Operand.Type);
2498
if (
ITypeSymbolHelpers
.IsBooleanType(left.Type))
2503
else if (
ITypeSymbolHelpers
.IsDynamicType(left.Type) || unaryOperatorMethod != null)
2508
(
ITypeSymbolHelpers
.IsBooleanType(unaryOperatorMethod.ReturnType) &&
2509
(
ITypeSymbolHelpers
.IsNullableType(left.Type) || !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))))
2535
if (!
ITypeSymbolHelpers
.IsDynamicType(left.Type))
2595
if (
ITypeSymbolHelpers
.IsNullableType(left.Type))
2597
if (unaryOperatorMethod == null ? isLifted : !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))
2603
Debug.Assert(unaryOperatorMethod == null || !
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type));
2607
else if (unaryOperatorMethod != null &&
ITypeSymbolHelpers
.IsNullableType(unaryOperatorMethod.Parameters[0].Type))
2612
if (unaryOperatorMethod != null &&
ITypeSymbolHelpers
.IsBooleanType(unaryOperatorMethod.ReturnType))
2714
Debug.Assert(
ITypeSymbolHelpers
.IsBooleanType(condition.Type));
2763
ITypeSymbolHelpers
.IsBooleanType(binOp.Type) &&
2764
ITypeSymbolHelpers
.IsBooleanType(binOp.LeftOperand.Type) &&
2765
ITypeSymbolHelpers
.IsBooleanType(binOp.RightOperand.Type);
2876
if (
ITypeSymbolHelpers
.IsBooleanType(condition.Type))
2881
if (
ITypeSymbolHelpers
.IsBooleanType(conditional.WhenTrue.Type) &&
2882
ITypeSymbolHelpers
.IsBooleanType(conditional.WhenFalse.Type))
2901
if (
ITypeSymbolHelpers
.IsBooleanType(condition.Type))
2905
if (
ITypeSymbolHelpers
.IsBooleanType(coalesce.WhenNull.Type))
3017
if (
ITypeSymbolHelpers
.IsNullableType(valueTypeOpt) &&
3018
(!testConversion.IsIdentity || !
ITypeSymbolHelpers
.IsNullableType(operation.Type)))
3324
Debug.Assert(
ITypeSymbolHelpers
.IsBooleanType(booleanType));
3342
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(valueType));
3365
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(value.Type));
3367
MakeInvalidOperation(
ITypeSymbolHelpers
.GetNullableUnderlyingType(value.Type), value);
3440
if (
ITypeSymbolHelpers
.IsNullableType(operation.Type) && !
ITypeSymbolHelpers
.IsNullableType(currentConditionalAccess.WhenNotNull.Type))
3468
(operation.Type.IsReferenceType && !
ITypeSymbolHelpers
.IsNullableType(operation.Type))
3556
if (
ITypeSymbolHelpers
.IsNullableType(testExpressionType))
4158
else if (
ITypeSymbolHelpers
.IsNullableType(resource.Type))
4180
((value.Type!.Equals(iDisposable) || (!value.Type.IsReferenceType && !
ITypeSymbolHelpers
.IsNullableType(value.Type))) && disposeArguments.IsDefaultOrEmpty));
4217
return type?.IsValueType == true && !
ITypeSymbolHelpers
.IsNullableType(type);
4766
ITypeSymbol? stepEnumUnderlyingTypeOrSelf =
ITypeSymbolHelpers
.GetEnumUnderlyingTypeOrSelf(operation.StepValue.Type);
4926
!
ITypeSymbolHelpers
.IsSignedIntegralType(stepEnumUnderlyingTypeOrSelf) &&
4927
!
ITypeSymbolHelpers
.IsUnsignedIntegralType(stepEnumUnderlyingTypeOrSelf))
4931
if (
ITypeSymbolHelpers
.IsNullableType(stepValue.Type))
4937
ITypeSymbol? stepValueEnumUnderlyingTypeOrSelf =
ITypeSymbolHelpers
.GetEnumUnderlyingTypeOrSelf(stepValue.Type);
4939
if (
ITypeSymbolHelpers
.IsNumericType(stepValueEnumUnderlyingTypeOrSelf))
5094
if (
ITypeSymbolHelpers
.IsUnsignedIntegralType(stepEnumUnderlyingTypeOrSelf))
5114
if (comparisonKind == BinaryOperatorKind.None &&
ITypeSymbolHelpers
.IsSignedIntegralType(stepEnumUnderlyingTypeOrSelf))
5160
if (
ITypeSymbolHelpers
.IsNullableType(operation.LimitValue.Type))
5331
bool isNullable =
ITypeSymbolHelpers
.IsNullableType(operation.StepValue.Type);
5391
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(controlVariableReferenceForIncrement.Type));
5564
bool leftIsNullable =
ITypeSymbolHelpers
.IsNullableType(operation.Value.Type);
5565
bool rightIsNullable =
ITypeSymbolHelpers
.IsNullableType(compareWith.Type);
5675
Debug.Assert(
ITypeSymbolHelpers
.IsNullableType(type));
5676
Debug.Assert(
ITypeSymbolHelpers
.GetNullableUnderlyingType(type).Equals(operand.Type));
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
137
if (
ITypeSymbolHelpers
.IsNullableType(type))
139
type =
ITypeSymbolHelpers
.GetNullableUnderlyingType(type);
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
83
!
ITypeSymbolHelpers
.IsNullableType(type) && !type.IsValueType)
227
if (
ITypeSymbolHelpers
.IsNullableType(symbol) && !symbol.IsDefinition)
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
18
else if (type.IsReferenceType || type.TypeKind == TypeKind.Pointer ||
ITypeSymbolHelpers
.IsNullableType(type))