1 instantiation of CommonConversion
Microsoft.CodeAnalysis (1)
Operations\OperationFactory.cs (1)
20public CommonConversion ToCommonConversion() => new CommonConversion(exists: true, isIdentity: true, isNumeric: false, isReference: false, methodSymbol: null, constrainedToType: null, isImplicit: true, isNullable: false);
70 references to CommonConversion
Microsoft.CodeAnalysis (19)
Compilation\Compilation.cs (2)
1595/// <returns>A <see cref="CommonConversion"/> that classifies the conversion from the 1597public abstract CommonConversion ClassifyCommonConversion(ITypeSymbol source, ITypeSymbol destination);
Generated\Operations.Generated.cs (14)
727CommonConversion Conversion { get; } 1225CommonConversion ValueConversion { get; } 1507CommonConversion InConversion { get; } 1512CommonConversion OutConversion { get; } 2575CommonConversion InConversion { get; } 2579CommonConversion OutConversion { get; } 3994CommonConversion ElementConversion { get; } 5106public CommonConversion Conversion => ConversionConvertible.ToCommonConversion(); 5809public CommonConversion ValueConversion => ValueConversionConvertible.ToCommonConversion(); 6319public CommonConversion InConversion => InConversionConvertible.ToCommonConversion(); 6321public CommonConversion OutConversion => OutConversionConvertible.ToCommonConversion(); 7927public CommonConversion InConversion => InConversionConvertible.ToCommonConversion(); 7929public CommonConversion OutConversion => OutConversionConvertible.ToCommonConversion(); 10739public CommonConversion ElementConversion => ElementConversionConvertible.ToCommonConversion();
Operations\ControlFlowGraphBuilder.cs (1)
2999CommonConversion testConversion = operation.ValueConversion;
Operations\IConvertibleConversion.cs (1)
9CommonConversion ToCommonConversion();
Operations\OperationFactory.cs (1)
20public CommonConversion ToCommonConversion() => new CommonConversion(exists: true, isIdentity: true, isNumeric: false, isReference: false, methodSymbol: null, constrainedToType: null, isImplicit: true, isNullable: false);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node);
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 151var conversion = GetConversion(semanticModel, node, cancellationToken);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (2)
146var firstConversion = semanticFacts.ClassifyConversion(semanticModel, castedExpression, castType); 147var secondConversion = semanticModel.Compilation.ClassifyCommonConversion(castType, conversionType);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
562var conversion = compilation.ClassifyCommonConversion(argumentTypeInfo.Type, parameterType);
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (2)
74var conversion = semanticModel.Compilation.ClassifyCommonConversion(elementType, variableDeclarator.Symbol.Type); 89CommonConversion conversion)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
122var conversion = semanticFacts.ClassifyConversion(semanticModel, expression, constructorParameter.Type);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
47CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination);
Microsoft.CodeAnalysis.CSharp (6)
Binder\Semantics\Conversions\Conversion.cs (4)
1143/// Creates a <see cref="CommonConversion"/> from this C# conversion. 1145/// <returns>The <see cref="CommonConversion"/> that represents this conversion.</returns> 1148/// from the <see cref="CommonConversion"/> struct. 1150public CommonConversion ToCommonConversion()
Compilation\CSharpCompilation.cs (2)
2323/// <returns>A <see cref="CommonConversion"/> that classifies the conversion from the 2325public override CommonConversion ClassifyCommonConversion(ITypeSymbol source, ITypeSymbol destination)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
26protected override (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(
src\Analyzers\CSharp\Analyzers\SimplifyBooleanExpression\CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
117public CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
27080CommonConversion ISpreadOperation.ElementConversion => throw null;
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
26protected override (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(
src\Analyzers\CSharp\Analyzers\SimplifyBooleanExpression\CSharpSimplifyConditionalDiagnosticAnalyzer.cs (1)
25protected override CommonConversion GetConversion(SemanticModel semanticModel, ExpressionSyntax node, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
117public CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination)
Microsoft.CodeAnalysis.Features (10)
Completion\Providers\AbstractContextVariableArgumentProvider.cs (2)
37CommonConversion bestConversion = default; 142bool IsNewConversionSameOrBetter(CommonConversion conversion)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
41protected abstract (CommonConversion conversion, ITypeSymbol? collectionElementType) GetForEachInfo(SemanticModel semanticModel, TForEachStatementSyntax node);
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
52protected abstract CommonConversion GetConversion(SemanticModel semanticModel, TExpressionSyntax node, CancellationToken cancellationToken); 151var conversion = GetConversion(semanticModel, node, cancellationToken);
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
147var secondConversion = semanticModel.Compilation.ClassifyCommonConversion(castType, conversionType);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
562var conversion = compilation.ClassifyCommonConversion(argumentTypeInfo.Type, parameterType);
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (2)
74var conversion = semanticModel.Compilation.ClassifyCommonConversion(elementType, variableDeclarator.Symbol.Type); 89CommonConversion conversion)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
122var conversion = semanticFacts.ClassifyConversion(semanticModel, expression, constructorParameter.Type);
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\OperationTreeVerifier.cs (2)
249private void LogConversion(CommonConversion conversion, string header = "Conversion") 258LogString($"{header}: {nameof(CommonConversion)} ({exists}, {isIdentity}, {isNumeric}, {isReference}, {isUserDefined}) (");
Compilation\TestOperationVisitor.cs (6)
583var inConversion = operation.InConversion; 584var outConversion = operation.OutConversion; 842var conversion = operation.Conversion; 905var valueConversion = operation.ValueConversion; 1173var inConversion = operation.InConversion; 1174var outConversion = operation.OutConversion;
Microsoft.CodeAnalysis.VisualBasic (5)
Compilation\VisualBasicCompilation.vb (1)
1894Public Overrides Function ClassifyCommonConversion(source As ITypeSymbol, destination As ITypeSymbol) As CommonConversion
Semantics\Conversions.vb (4)
234''' Creates a <see cref="CommonConversion"/> from this Visual Basic conversion. 236''' <returns>The <see cref="CommonConversion"/> that represents this conversion.</returns> 239''' from the <see cref="CommonConversion"/> struct. 241Public Function ToCommonConversion() As CommonConversion Implements IConvertibleConversion.ToCommonConversion
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\SimplifyBooleanExpression\VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (1)
134Public Function ClassifyConversion(semanticModel As SemanticModel, expression As SyntaxNode, destination As ITypeSymbol) As CommonConversion Implements ISemanticFactsService.ClassifyConversion
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\Analyzers\SimplifyBooleanExpression\VisualBasicSimplifyConditionalDiagnosticAnalyzer.vb (1)
23Protected Overrides Function GetConversion(semanticModel As SemanticModel, node As ExpressionSyntax, cancellationToken As CancellationToken) As CommonConversion
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (1)
134Public Function ClassifyConversion(semanticModel As SemanticModel, expression As SyntaxNode, destination As ITypeSymbol) As CommonConversion Implements ISemanticFactsService.ClassifyConversion
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
47CommonConversion ClassifyConversion(SemanticModel semanticModel, SyntaxNode expression, ITypeSymbol destination);