136 references to ConversionOperatorDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (27)
Binder\BinderFactory.BinderFactoryVisitor.cs (3)
368public override Binder VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax parent) 471var conversionDeclaration = (ConversionOperatorDeclarationSyntax)baseMethodDeclarationSyntax;
Binder\LocalBinderFactory.cs (1)
201public override void VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax node)
Binder\Semantics\Operators\OperatorFacts.cs (1)
151public static string OperatorNameFromDeclaration(ConversionOperatorDeclarationSyntax declaration)
Compilation\SyntaxTreeSemanticModel.cs (2)
1688var operatorDecl = (ConversionOperatorDeclarationSyntax)declaration;
Parser\LanguageParser.cs (2)
3549private ConversionOperatorDeclarationSyntax TryParseConversionOperatorDeclaration(SyntaxList<AttributeListSyntax> attributes, SyntaxListBuilder modifiers) 3802var conversionOperator = TryParseConversionOperatorDeclaration(attributes, modifiers);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
395arrowExpr = ((ConversionOperatorDeclarationSyntax)node).ExpressionBody;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
5171var conversionOperatorSyntax = (ConversionOperatorDeclarationSyntax)m;
Symbols\Source\SourceUserDefinedConversionSymbol.cs (5)
19ConversionOperatorDeclarationSyntax syntax, 59ConversionOperatorDeclarationSyntax syntax, 93internal ConversionOperatorDeclarationSyntax GetSyntax() 96return (ConversionOperatorDeclarationSyntax)syntaxReferenceOpt.GetSyntax(); 129ConversionOperatorDeclarationSyntax declarationSyntax = GetSyntax();
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
310case ConversionOperatorDeclarationSyntax conversionDeclaration: 801case ConversionOperatorDeclarationSyntax conversionDeclaration:
Syntax\ConversionOperatorDeclarationSyntax.cs (2)
9public ConversionOperatorDeclarationSyntax Update( 33public ConversionOperatorDeclarationSyntax Update(
Syntax\SyntaxFactory.cs (5)
2469public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration( 2491public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration( 2514public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration( 2534/// <summary>Creates a new <see cref="ConversionOperatorDeclarationSyntax"/> instance.</summary> 2535public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(
Syntax\SyntaxFacts.cs (1)
176return ((ConversionOperatorDeclarationSyntax)parent).Type == node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (16)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (11)
15UseExpressionBodyHelper<ConversionOperatorDeclarationSyntax> 32protected override BlockSyntax? GetBody(ConversionOperatorDeclarationSyntax declaration) 35protected override ArrowExpressionClauseSyntax? GetExpressionBody(ConversionOperatorDeclarationSyntax declaration) 38protected override SyntaxToken GetSemicolonToken(ConversionOperatorDeclarationSyntax declaration) 41protected override ConversionOperatorDeclarationSyntax WithSemicolonToken(ConversionOperatorDeclarationSyntax declaration, SyntaxToken token) 44protected override ConversionOperatorDeclarationSyntax WithExpressionBody(ConversionOperatorDeclarationSyntax declaration, ArrowExpressionClauseSyntax? expressionBody) 47protected override ConversionOperatorDeclarationSyntax WithBody(ConversionOperatorDeclarationSyntax declaration, BlockSyntax? body) 50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
107ConversionOperatorDeclarationSyntax conversion => conversion.Type,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
131return ((ConversionOperatorDeclarationSyntax)member).WithParameterList((ParameterListSyntax)parameterList);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
67return ((ConversionOperatorDeclarationSyntax)declaration).ExplicitInterfaceSpecifier == null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
827name = (memberDeclaration as ConversionOperatorDeclarationSyntax)?.Type.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
129ConversionOperatorDeclarationSyntax)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (17)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (9)
28var methodDeclaration = GenerateConversionDeclaration(method, GetDestination(destination), info, cancellationToken); 34internal static ConversionOperatorDeclarationSyntax GenerateConversionDeclaration( 40var declaration = GenerateConversionDeclarationWorker(method, destination, info, cancellationToken); 45private static ConversionOperatorDeclarationSyntax GenerateConversionDeclarationWorker( 51var reusableSyntax = GetReuseableSyntaxNodeForSymbol<ConversionOperatorDeclarationSyntax>(method, info); 66var declaration = ConversionOperatorDeclaration( 84private static ConversionOperatorDeclarationSyntax UseExpressionBodyIfDesired( 85CSharpCodeGenerationContextInfo info, ConversionOperatorDeclarationSyntax declaration, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
167=> members.LastOrDefault(m => m is OperatorDeclarationSyntax or ConversionOperatorDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
812var conversionOperatorDeclarationSyntax = (ConversionOperatorDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
143return Compare((ConversionOperatorDeclarationSyntax)x, (ConversionOperatorDeclarationSyntax)y); 213private static int Compare(ConversionOperatorDeclarationSyntax x, ConversionOperatorDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1131OperatorDeclarationSyntax or ConversionOperatorDeclarationSyntax when includeOperators => true,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\ConversionOperatorDeclarationStructureTests.cs (1)
15public class ConversionOperatorDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<ConversionOperatorDeclarationSyntax>
Structure\MetadataAsSource\ConversionOperatorDeclarationStructureTests.cs (1)
14public class ConversionOperatorDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<ConversionOperatorDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Features (23)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1686var conversionOperatorDeclaration = (ConversionOperatorDeclarationSyntax)node;
EditAndContinue\SyntaxComparer.cs (1)
1450return ((ConversionOperatorDeclarationSyntax)node).Type;
EditAndContinue\SyntaxUtilities.cs (1)
25ConversionOperatorDeclarationSyntax conversionDeclaration => CreateSimpleBody(BlockOrExpression(conversionDeclaration.Body, conversionDeclaration.ExpressionBody)),
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
75ConversionOperatorDeclarationSyntax conversionOperatorDeclarationNode => conversionOperatorDeclarationNode.Type.GetFirstToken(),
LineSeparators\CSharpLineSeparatorService.cs (1)
207if (node is ConversionOperatorDeclarationSyntax conversionDecl)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (11)
15UseExpressionBodyHelper<ConversionOperatorDeclarationSyntax> 32protected override BlockSyntax? GetBody(ConversionOperatorDeclarationSyntax declaration) 35protected override ArrowExpressionClauseSyntax? GetExpressionBody(ConversionOperatorDeclarationSyntax declaration) 38protected override SyntaxToken GetSemicolonToken(ConversionOperatorDeclarationSyntax declaration) 41protected override ConversionOperatorDeclarationSyntax WithSemicolonToken(ConversionOperatorDeclarationSyntax declaration, SyntaxToken token) 44protected override ConversionOperatorDeclarationSyntax WithExpressionBody(ConversionOperatorDeclarationSyntax declaration, ArrowExpressionClauseSyntax? expressionBody) 47protected override ConversionOperatorDeclarationSyntax WithBody(ConversionOperatorDeclarationSyntax declaration, BlockSyntax? body) 50protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel, ConversionOperatorDeclarationSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
107ConversionOperatorDeclarationSyntax conversion => conversion.Type,
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
395arrowExpr = ((ConversionOperatorDeclarationSyntax)node).ExpressionBody;
Structure\CSharpBlockStructureProvider.cs (1)
27builder.Add<ConversionOperatorDeclarationSyntax, ConversionOperatorDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
271ConversionOperatorDeclarationSyntax conversionOperatorDeclaration => conversionOperatorDeclaration.Modifiers.FirstOrNull() ?? conversionOperatorDeclaration.ImplicitOrExplicitKeyword,
Structure\Providers\ConversionOperatorDeclarationStructureProvider.cs (2)
14internal class ConversionOperatorDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<ConversionOperatorDeclarationSyntax> 18ConversionOperatorDeclarationSyntax operatorDeclaration,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (4)
4440var conversionDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConversionOperatorDeclarationSyntax>().Single(); 4471var conversionDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ConversionOperatorDeclarationSyntax>().Single();
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
28778var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<ConversionOperatorDeclarationSyntax>());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Generated\Syntax.Test.xml.Generated.cs (5)
10784private static ConversionOperatorDeclarationSyntax GenerateConversionOperatorDeclaration() 13301var node = GenerateConversionOperatorDeclaration(); 13314var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithImplicitOrExplicitKeyword(node.ImplicitOrExplicitKeyword).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithOperatorKeyword(node.OperatorKeyword).WithCheckedKeyword(node.CheckedKeyword).WithType(node.Type).WithParameterList(node.ParameterList).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken); 18909var oldNode = GenerateConversionOperatorDeclaration(); 18925var oldNode = GenerateConversionOperatorDeclaration();
Parsing\DeclarationParsingTests.cs (4)
5553var ms = (ConversionOperatorDeclarationSyntax)cs.Members[0]; 5601var ms = (ConversionOperatorDeclarationSyntax)cs.Members[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
629SyntaxKind.ConversionOperatorDeclaration => ((ConversionOperatorDeclarationSyntax)declaration).WithExplicitInterfaceSpecifier(specifier), 2214return ((ConversionOperatorDeclarationSyntax)declaration).WithParameterList(list); 2461SyntaxKind.ConversionOperatorDeclaration => ((ConversionOperatorDeclarationSyntax)declaration).Body?.Statements,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
131return ((ConversionOperatorDeclarationSyntax)member).WithParameterList((ParameterListSyntax)parameterList);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
67return ((ConversionOperatorDeclarationSyntax)declaration).ExplicitInterfaceSpecifier == null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
827name = (memberDeclaration as ConversionOperatorDeclarationSyntax)?.Type.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
129ConversionOperatorDeclarationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (9)
28var methodDeclaration = GenerateConversionDeclaration(method, GetDestination(destination), info, cancellationToken); 34internal static ConversionOperatorDeclarationSyntax GenerateConversionDeclaration( 40var declaration = GenerateConversionDeclarationWorker(method, destination, info, cancellationToken); 45private static ConversionOperatorDeclarationSyntax GenerateConversionDeclarationWorker( 51var reusableSyntax = GetReuseableSyntaxNodeForSymbol<ConversionOperatorDeclarationSyntax>(method, info); 66var declaration = ConversionOperatorDeclaration( 84private static ConversionOperatorDeclarationSyntax UseExpressionBodyIfDesired( 85CSharpCodeGenerationContextInfo info, ConversionOperatorDeclarationSyntax declaration, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
167=> members.LastOrDefault(m => m is OperatorDeclarationSyntax or ConversionOperatorDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
812var conversionOperatorDeclarationSyntax = (ConversionOperatorDeclarationSyntax)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
143return Compare((ConversionOperatorDeclarationSyntax)x, (ConversionOperatorDeclarationSyntax)y); 213private static int Compare(ConversionOperatorDeclarationSyntax x, ConversionOperatorDeclarationSyntax y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1131OperatorDeclarationSyntax or ConversionOperatorDeclarationSyntax when includeOperators => true,
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.cs (5)
962VerifySyntax<ConversionOperatorDeclarationSyntax>( 966VerifySyntax<ConversionOperatorDeclarationSyntax>( 992VerifySyntax<ConversionOperatorDeclarationSyntax>( 999VerifySyntax<ConversionOperatorDeclarationSyntax>( 1275VerifySyntax<ConversionOperatorDeclarationSyntax>(
Microsoft.DotNet.GenFacades (1)
NotSupportedAssemblyGenerator.cs (1)
189public override SyntaxNode VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax node)
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (3)
834var conversionOperator = (ConversionOperatorDeclarationSyntax)node; 3394else if (container is ConversionOperatorDeclarationSyntax conversion)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
404startPosition = ((ConversionOperatorDeclarationSyntax)node).ImplicitOrExplicitKeyword.SpanStart; 967endPosition = ((ConversionOperatorDeclarationSyntax)node).ImplicitOrExplicitKeyword.Span.End;
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
216var conversionOperatorDeclaration = (ConversionOperatorDeclarationSyntax)node;