64 references to ClassifyConversion
Microsoft.AspNetCore.Components.Analyzers (3)
ComponentFacts.cs (1)
102var conversion = compilation.ClassifyConversion(symbols.IComponentType, type);
ComponentParameterAnalyzer.cs (1)
102var conversion = context.Compilation.ClassifyConversion(symbols.ParameterCaptureUnmatchedValuesRuntimeType, property.Type);
ComponentParameterUsageAnalyzer.cs (1)
89var conversion = context.Compilation.ClassifyConversion(propertyContainingType, assignmentContainingType);
Microsoft.AspNetCore.Components.SdkAnalyzers (3)
ComponentFacts.cs (1)
102var conversion = compilation.ClassifyConversion(symbols.IComponentType, type);
ComponentParameterAnalyzer.cs (1)
96var conversion = context.Compilation.ClassifyConversion(symbols.ParameterCaptureUnmatchedValuesRuntimeType, property.Type);
ComponentParameterUsageAnalyzer.cs (1)
89var conversion = context.Compilation.ClassifyConversion(propertyContainingType, assignmentContainingType);
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
270var conversion = compilation.ClassifyConversion(type1, type2);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
281var conversion = compilation.ClassifyConversion(type, convertedType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
490originalSemanticModel.Compilation.ClassifyConversion(castedExpressionType, isType).Exists)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
932=> compilation.ClassifyConversion(sourceType, targetType).IsReference; 938=> model.Compilation.ClassifyConversion(originalType, targetType);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (1)
102var conversion = semanticModel.Compilation.ClassifyConversion(rightType, leftType);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
197var conversion = _semanticModel.Compilation.ClassifyConversion(typeInfo.Type, typeInfo.ConvertedType);
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
183=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
145var conversion = compilation.ClassifyConversion(sourceType, targetType);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
153if (!model.Compilation.ClassifyConversion(typeArgument, returnExpressionType).Exists)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (26)
CodeGen\CodeGenTupleTest.cs (26)
18890Assert.Equal(ConversionKind.NoConversion, comp.ClassifyConversion(int_int, int_int_int).Kind); 18891Assert.Equal(ConversionKind.NoConversion, comp.ClassifyConversion(int_int, string_string).Kind); 18956Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_string2).Kind); 18957Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_string1).Kind); 18958Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_object).Kind); 18959Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_object).Kind); 18961Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string1).Kind); 18962Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string2).Kind); 18981Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_string2).Kind); 18982Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_string1).Kind); 18983Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_object).Kind); 18984Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_object).Kind); 18986Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string1).Kind); 18987Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string2).Kind); 19007Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_string2).Kind); 19008Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_string1).Kind); 19009Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_object).Kind); 19010Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_object).Kind); 19012Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string1).Kind); 19013Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string2).Kind); 19034Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_string2).Kind); 19035Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_string1).Kind); 19036Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string1, int_object).Kind); 19037Assert.Equal(ConversionKind.ImplicitTuple, comp.ClassifyConversion(int_string2, int_object).Kind); 19039Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string1).Kind); 19040Assert.Equal(ConversionKind.ExplicitTuple, comp.ClassifyConversion(int_object, int_string2).Kind);
Microsoft.CodeAnalysis.CSharp.Features (10)
GenerateType\CSharpGenerateTypeService.cs (1)
565=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
InitializeParameter\InitializeParameterHelpers.cs (1)
50=> compilation.ClassifyConversion(source: source, destination: destination).IsImplicit;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
270var conversion = compilation.ClassifyConversion(type1, type2);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
281var conversion = compilation.ClassifyConversion(type, convertedType);
src\Analyzers\CSharp\CodeFixes\AddExplicitCast\CSharpAddExplicitCastCodeFixProvider.cs (1)
102var conversion = semanticModel.Compilation.ClassifyConversion(rightType, leftType);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
197var conversion = _semanticModel.Compilation.ClassifyConversion(typeInfo.Type, typeInfo.ConvertedType);
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
183=> compilation.ClassifyConversion(sourceType, targetType).IsImplicit;
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
145var conversion = compilation.ClassifyConversion(sourceType, targetType);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
153if (!model.Compilation.ClassifyConversion(typeArgument, returnExpressionType).Exists)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (1)
49var conversion = semanticModel.Compilation.ClassifyConversion(argType, parameters[0].Type);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\FunctionPointerTests.cs (1)
218var classifiedConversion = comp.ClassifyConversion(typeInfo.Type, typeInfo.ConvertedType!);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\GetSemanticInfoTests.cs (2)
648var conversion = info.Type != null && info.ConvertedType != null ? model.Compilation.ClassifyConversion(info.Type, info.ConvertedType) : Conversion.NoConversion; 863var act2 = semanticModel.Compilation.ClassifyConversion(info.Type, info.ConvertedType);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
490originalSemanticModel.Compilation.ClassifyConversion(castedExpressionType, isType).Exists)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
932=> compilation.ClassifyConversion(sourceType, targetType).IsReference; 938=> model.Compilation.ClassifyConversion(originalType, targetType);
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (1)
730var conversion = _compilation.ClassifyConversion(source, dest);
ParserUtilities.cs (1)
54var conversion = comp.ClassifyConversion(source, dest);
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
287var conversion = _compilation.ClassifyConversion(source, dest);
Microsoft.Gen.Logging (1)
src\Generators\Shared\ParserUtilities.cs (1)
59var conversion = comp.ClassifyConversion(source, dest);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\ParserUtilities.cs (1)
59var conversion = comp.ClassifyConversion(source, dest);
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\ParserUtilities.cs (1)
59var conversion = comp.ClassifyConversion(source, dest);