21 references to CastExpression
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
184return (TExpressionSyntax)generator.CastExpression(conversion.Type, sourceSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
158through = generator.CastExpression(interfaceBeingImplemented, 167var explicitImplementationCast = generator.CastExpression(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
171containingType, localName, factory.CastExpression(containingType, objNameExpression));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
115: generator.CastExpression(type, finalAssignment);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
193return SyntaxGenerator.GetGenerator(document).CastExpression(delegateType, reference);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
35return generator.CastExpression(enumType, expression);
Microsoft.CodeAnalysis.CSharp.Features (4)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
130generator.AddParentheses(generator.CastExpression(interfaceType, generator.ThisExpression())), 139g.CastExpression(interfaceType, current.WithoutTrivia())).WithTriviaFrom(current));
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
115: generator.CastExpression(type, finalAssignment);
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
193return SyntaxGenerator.GetGenerator(document).CastExpression(delegateType, reference);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
35return generator.CastExpression(enumType, expression);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\ExpressionGenerationTests.cs (1)
525f => f.CastExpression(
CodeGeneration\ExpressionPrecedenceGenerationTests.cs (2)
353f.CastExpression( 367f => f.CastExpression(
Microsoft.CodeAnalysis.Features (3)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
140memberAccess = generator.CastExpression(castType, memberAccess);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
170? generator.CastExpression(comparableType, thisExpression)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
184return (TExpressionSyntax)generator.CastExpression(conversion.Type, sourceSyntax);
Microsoft.CodeAnalysis.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
158through = generator.CastExpression(interfaceBeingImplemented, 167var explicitImplementationCast = generator.CastExpression(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
171containingType, localName, factory.CastExpression(containingType, objNameExpression));