204 references to Exists
Microsoft.AspNetCore.Components.Analyzers (4)
ComponentFacts.cs (1)
103if (!conversion.Exists || !conversion.IsExplicit)
ComponentParameterAnalyzer.cs (1)
103if (!conversion.Exists || conversion.IsExplicit)
ComponentParameterUsageAnalyzer.cs (2)
90if (conversion.Exists && conversion.IsIdentity) 96if (conversion.Exists && conversion.IsExplicit)
Microsoft.AspNetCore.Components.SdkAnalyzers (4)
ComponentFacts.cs (1)
103if (!conversion.Exists || !conversion.IsExplicit)
ComponentParameterAnalyzer.cs (1)
97if (!conversion.Exists || conversion.IsExplicit)
ComponentParameterUsageAnalyzer.cs (2)
90if (conversion.Exists && conversion.IsIdentity) 96if (conversion.Exists && conversion.IsExplicit)
Microsoft.CodeAnalysis.CSharp (130)
Binder\Binder_Conversions.cs (5)
214Debug.Assert(!conversion.Exists); 235|| !conversion.Exists); 256Debug.Assert(!conversion.Exists); 276if (!hasErrors && conversion.Exists) 1531if (!conversion.Exists)
Binder\Binder_Expressions.cs (3)
2887if (!underlyingConversion.Exists) 5413if (!conv.Exists) 9501if (!conversion.Exists)
Binder\Binder_Invocation.cs (2)
1642&& Conversions.ClassifyBuiltInConversion(Compilation.GetSpecialType(SpecialType.System_String), parameterType, isChecked: false, ref discardedUseSiteInfo).Exists 1747if (!conversion.Exists)
Binder\Binder_Operators.cs (8)
1070if (implicitConversion.Exists) 3828if (conversion.Exists) 4068if (rightConversion.Exists) 4086if (rightConversion.Exists) 4137if (leftConversionClassification.Exists) 4151if (leftConversionClassification.Exists) 4203if (underlyingRightConversion.Exists && rightOperand.Type?.IsDynamic() != true) 4218if (rightConversion.Exists)
Binder\Binder_Patterns.cs (1)
770if (!conversion.Exists && (inputType.ContainsTypeParameter() || patternType.ContainsTypeParameter()))
Binder\DecisionDagBuilder.cs (1)
1545return (!conversion.Exists && isRuntimeSimilar(expressionType, patternType))
Binder\Semantics\BestTypeInferrer.cs (4)
146if (conversionsWithoutNullability.ClassifyImplicitConversionFromExpression(expr2, type1, ref useSiteInfo).Exists) 161if (conversionsWithoutNullability.ClassifyImplicitConversionFromExpression(expr1, type2, ref useSiteInfo).Exists) 290var t1tot2 = conversionsWithoutNullability.ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(type1, type2, ref useSiteInfo).Exists; 291var t2tot1 = conversionsWithoutNullability.ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(type2, type1, ref useSiteInfo).Exists;
Binder\Semantics\Conversions\Conversion.cs (3)
568if (!this.Exists) 633return Exists && !IsImplicit; 1154return new CommonConversion(Exists, IsIdentity, IsNumeric, IsReference, IsImplicit, IsNullable, methodSymbol, constrainedToType);
Binder\Semantics\Conversions\Conversions.cs (2)
207if (!elementConversion.Exists) 506if (spanConversion.Exists)
Binder\Semantics\Conversions\ConversionsBase.cs (60)
113if (conversion.Exists) 122if (fastConversion.Exists) 132if (conversion.Exists) 147if (conversion.Exists) 158if (conversion.Exists) 182if (fastConversion.Exists) 189if (conversion.Exists) 300if (result.Exists) 334if (fastConversion.Exists) 341if (conversion1.Exists) 348if (conversion.Exists) 354if (conversion.Exists) 382if (implicitConversion.Exists && !ExplicitConversionMayDifferFromImplicit(implicitConversion)) 388if (explicitConversion.Exists) 436if (fastConversion.Exists) 442if (implicitBuiltInConversion.Exists && !ExplicitConversionMayDifferFromImplicit(implicitBuiltInConversion)) 448if (explicitBuiltInConversion.Exists) 453if (implicitBuiltInConversion.Exists) 475if (conversion.Exists) 506if (fastConversion.Exists) 513if (conversion.Exists) 570if (conversion.Exists) 643if (conversion.Exists && 717if (nullableConversion.Exists) 749if (tupleConversion.Exists) 774if (conversion.Exists) 823if (nullableConversion.Exists) 839if (tupleConversion.Exists) 922impliedExplicitConversion = underlyingConversion.Exists ? 1054if (constantConversion.Exists) 1063if (nullLiteralConversion.Exists) 1076if (innerConversion.Exists) 1084if (tupleConversion.Exists) 1099if (methodGroupConversion.Exists) 1108if (interpolatedStringConversion.Exists) 1115if (stackAllocConversion.Exists) 1123if (addressOfConversion.Exists) 1137if (collectionExpressionConversion.Exists) 1162if (collectionExpressionConversion.Exists) 1174if (underlyingConversion.Exists) 1198if (!nestedConversion.Exists) 1221if (!trueConversion.Exists) 1225if (!falseConversion.Exists) 1298if (tupleConversion.Exists) 1310if (underlyingTupleConversion.Exists) 1324if (tupleConversion.Exists) 1339if (underlyingTupleConversion.Exists) 1413if (tupleConversion.Exists) 1424if (fastConversion.Exists) 1431if (conversion.Exists) 1623return ClassifyImplicitConversionFromType(multicastDelegateType, type, ref useSiteInfo).Exists; 1770if (constantConversion.Exists) 1780return GetCallerLineNumberConversion(destination, ref useSiteInfo).Exists; 1787return conversion.Exists; 1965if (tupleConversion.Exists) 1988if (tupleConversion.Exists) 2273if (tupleConversion.Exists) 2348if (!result.Exists) 2421if (!conversion.Exists) 2470if (tupleConversion.Exists)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (8)
273if (!fromConversion.Exists && 276EncompassingExplicitConversion(source.GetNullableUnderlyingType(), convertsFrom, ref useSiteInfo).Exists) 282if (!toConversion.Exists && 285EncompassingExplicitConversion(convertsTo, target.GetNullableUnderlyingType(), ref useSiteInfo).Exists) 315if (fromConversion.Exists && toConversion.Exists) 323Debug.Assert(liftedFromConversion.Exists); 324Debug.Assert(liftedToConversion.Exists);
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (5)
303if (fromConversion.Exists && toConversion.Exists) 351if (liftedFromConversion.Exists && liftedToConversion.Exists) 580return EncompassingImplicitConversion(aExpr, a, b, ref useSiteInfo).Exists;
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (2)
317Debug.Assert(leftConversion.Exists && leftConversion.IsImplicit); 318Debug.Assert(rightConversion.Exists && rightConversion.IsImplicit);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
3025return conversions.ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(source, destination, ref useSiteInfo).Exists;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
4486if (!conversion.Exists) 4592Debug.Assert((!conversion.Exists) || conversion.IsImplicit, "ClassifyImplicitConversion should only return implicit conversions");
Binder\SwitchExpressionBinder.cs (1)
163if (!this.Conversions.ClassifyImplicitConversionFromExpression(@case.Value, commonType, ref useSiteInfo).Exists)
FlowAnalysis\NullableWalker.cs (10)
5198if (conversion.Exists && !conversion.IsExplicit) 5639GenerateConversionForConditionalOperator(node.LeftOperand, leftType, rightType, reportMismatch: false, isChecked: node.Checked) is { Exists: true } conversion) 7369if (!conversion.Exists && !argumentNoConversion.IsSuppressed) 8082bool canConvertNestedNullability = conversion.Exists; 8980canConvertNestedNullability = conversion.Exists; 9006canConvertNestedNullability = conversion.Exists; 9058canConvertNestedNullability = conversion.Exists; 9076canConvertNestedNullability = conversion.Exists; 9087canConvertNestedNullability = conversion.Exists && conversion.IsSpan; 9562if (reportWarnings && !conversion.Exists)
Lowering\DiagnosticsPass_Warnings.cs (1)
288if (!node.Operator.Kind.IsDynamic() && node.LeftConversion is BoundConversion { Conversion: { IsIdentity: false, Exists: true } conversion })
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
216if (conversion.Exists)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (4)
1763if (!fromConversion.Exists) 1769if (!toConversion.Exists) 1869if (!fromConversion.Exists) 1875if (!toConversion.Exists)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
50if (leftConversion is not BoundConversion { Conversion: { Exists: true } })
Lowering\SyntheticBoundNodeFactory.cs (2)
1479if (allowBoxingByRefLikeTypeParametersToObject && !c.Exists && 1485Debug.Assert(c.Exists);
Operations\CSharpOperationFactory.cs (1)
1595if (valueConversion.Exists && !valueConversion.IsIdentity &&
Symbols\ReducedExtensionMethodSymbol.cs (1)
53if (!conversion.Exists)
Symbols\Source\ParameterHelpers.cs (1)
777else if (!conversion.Exists ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
154if (conversion.Exists &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
101semanticModel.ClassifyConversion(cast.Expression, parentConversionType).Exists) 290if (!originalConversion.Exists) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 490originalSemanticModel.Compilation.ClassifyConversion(castedExpressionType, isType).Exists) 1034if (parentConversion.Exists && parentConversion.IsBoxing)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (6)
448if (originalConversion.Exists != newConversion.Exists) 714return originalConversion.Exists != newConversion.Exists; 855if (originalConversion.Exists != newConversion.Exists ||
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (1)
103if (conversion.Exists && conversion.IsExplicit)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
153if (!model.Compilation.ClassifyConversion(typeArgument, returnExpressionType).Exists)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\OutVarTests.cs (1)
1059Assert.False(conversion.Exists);
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
154if (conversion.Exists &&
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (1)
103if (conversion.Exists && conversion.IsExplicit)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
153if (!model.Compilation.ClassifyConversion(typeArgument, returnExpressionType).Exists)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
50if (!conversion.Exists || conversion.IsExplicit)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\InterpolationTests.cs (1)
4610Assert.True(semanticInfo.ImplicitConversion.Exists);
Semantics\RawInterpolationTests_Handler.cs (1)
2911Assert.True(semanticInfo.ImplicitConversion.Exists);
Semantics\Utf8StringsLiteralsTests.cs (5)
2979Assert.False(model.GetConversion(node).Exists); 3035Assert.False(model.GetConversion(node).Exists); 3091Assert.False(model.GetConversion(node).Exists); 3147Assert.False(model.GetConversion(node).Exists); 3203Assert.False(model.GetConversion(node).Exists);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (29)
Compilation\GetSemanticInfoTests.cs (27)
671Assert.False(conv.Exists); 676Assert.True(conv.Exists); 682Assert.True(conv.Exists); 688Assert.True(conv.Exists); 694Assert.True(conv.Exists); 700Assert.True(conv.Exists); 706Assert.True(conv.Exists); 712Assert.True(conv.Exists); 718Assert.True(conv.Exists); 724Assert.True(conv.Exists); 730Assert.True(conv.Exists); 736Assert.True(conv.Exists); 742Assert.True(conv.Exists); 748Assert.True(conv.Exists); 754Assert.True(conv.Exists); 760Assert.True(conv.Exists); 766Assert.True(conv.Exists); 772Assert.True(conv.Exists); 778Assert.True(conv.Exists); 784Assert.True(conv.Exists); 790Assert.True(conv.Exists); 797Assert.True(conv.Exists); 804Assert.True(conv.Exists); 811Assert.True(conv.Exists); 818Assert.True(conv.Exists); 825Assert.True(conv.Exists); 5992Assert.True(foreachSymbolInfo.CurrentConversion.Exists);
Symbols\ConversionTests.cs (2)
408Assert.False(conversion.Exists); 420Assert.False(conversion.Exists);
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (5)
101semanticModel.ClassifyConversion(cast.Expression, parentConversionType).Exists) 290if (!originalConversion.Exists) 349if (rewrittenConvertedType is null || rewrittenConvertedType.TypeKind == TypeKind.Error || !rewrittenConversion.Exists) 490originalSemanticModel.Compilation.ClassifyConversion(castedExpressionType, isType).Exists) 1034if (parentConversion.Exists && parentConversion.IsBoxing)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (6)
448if (originalConversion.Exists != newConversion.Exists) 714return originalConversion.Exists != newConversion.Exists; 855if (originalConversion.Exists != newConversion.Exists ||