2 overrides of ClassifyCommonConversion
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpCompilation.cs (1)
2325public override CommonConversion ClassifyCommonConversion(ITypeSymbol source, ITypeSymbol destination)
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicCompilation.vb (1)
1894Public Overrides Function ClassifyCommonConversion(source As ITypeSymbol, destination As ITypeSymbol) As CommonConversion
27 references to ClassifyCommonConversion
Microsoft.CodeAnalysis (1)
Compilation\Compilation.cs (1)
1606=> fromType != null && toType != null && this.ClassifyCommonConversion(fromType, toType).IsImplicit;
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
105conversion = context.Compilation.ClassifyCommonConversion(collectionElementType, iterationType);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
89return compilation.ClassifyCommonConversion(firstType, secondType).IsImplicit 90^ compilation.ClassifyCommonConversion(secondType, firstType).IsImplicit;
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
147var secondConversion = semanticModel.Compilation.ClassifyCommonConversion(castType, conversionType);
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
170&& semanticModel.Compilation.ClassifyCommonConversion(argumentType, parameterType).IsIdentity)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
562var conversion = compilation.ClassifyCommonConversion(argumentTypeInfo.Type, parameterType);
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
74var conversion = semanticModel.Compilation.ClassifyCommonConversion(elementType, variableDeclarator.Symbol.Type);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
378=> compilation.ClassifyCommonConversion(sourceType, targetType).IsImplicit;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (2)
88t => compilation.ClassifyCommonConversion(t.p1.Type, t.p2.Type) is not { IsImplicit: true, Exists: true })) 96return compilation.ClassifyCommonConversion(conflictingMethod.ReturnType, method.ReturnType) is { IsImplicit: true, Exists: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
223if (compilation.ClassifyCommonConversion(conflictingProperty.Type, property.Type) is { Exists: true, IsImplicit: true }) 264if (compilation.ClassifyCommonConversion(property.Type, conflictingProperty.Type) is { Exists: true, IsImplicit: true })
Microsoft.CodeAnalysis.Features (12)
Completion\Providers\CompletionUtilities.cs (1)
19if (compilation.ClassifyCommonConversion(sourceType, targetType).IsImplicit)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
143return type != null && compilation.ClassifyCommonConversion(type, disposableType).IsImplicit;
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
105conversion = context.Compilation.ClassifyCommonConversion(collectionElementType, iterationType);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
89return compilation.ClassifyCommonConversion(firstType, secondType).IsImplicit 90^ compilation.ClassifyCommonConversion(secondType, firstType).IsImplicit;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
147var secondConversion = semanticModel.Compilation.ClassifyCommonConversion(castType, conversionType);
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
170&& semanticModel.Compilation.ClassifyCommonConversion(argumentType, parameterType).IsIdentity)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
562var conversion = compilation.ClassifyCommonConversion(argumentTypeInfo.Type, parameterType);
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
74var conversion = semanticModel.Compilation.ClassifyCommonConversion(elementType, variableDeclarator.Symbol.Type);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
378=> compilation.ClassifyCommonConversion(sourceType, targetType).IsImplicit;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (2)
88t => compilation.ClassifyCommonConversion(t.p1.Type, t.p2.Type) is not { IsImplicit: true, Exists: true })) 96return compilation.ClassifyCommonConversion(conflictingMethod.ReturnType, method.ReturnType) is { IsImplicit: true, Exists: true };
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
223if (compilation.ClassifyCommonConversion(conflictingProperty.Type, property.Type) is { Exists: true, IsImplicit: true }) 264if (compilation.ClassifyCommonConversion(property.Type, conflictingProperty.Type) is { Exists: true, IsImplicit: true })