1 instantiation of RefTypeSyntax
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Internal.Generated.cs (1)
1657internal override SyntaxNode CreateRed(SyntaxNode? parent, int position) => new CSharp.Syntax.RefTypeSyntax(this, parent, position);
81 references to RefTypeSyntax
Microsoft.CodeAnalysis.CSharp (30)
Binder\Binder_Deconstruct.cs (3)
829if (typeSyntax is RefTypeSyntax refType) 889if (typeSyntax is RefTypeSyntax refType) 939if (typeSyntax is RefTypeSyntax refType)
Binder\Binder_Expressions.cs (3)
3169if (typeSyntax is RefTypeSyntax refType) 3213if (typeSyntax is RefTypeSyntax refType) 3264if (typeSyntax is RefTypeSyntax refType)
Binder\Binder_Symbols.cs (2)
489var refTypeSyntax = (RefTypeSyntax)syntax;
Binder\ForEachLoopBinder.cs (1)
299if (typeSyntax is RefTypeSyntax refType)
Binder\ForLoopBinder.cs (1)
77if (type is RefTypeSyntax)
Syntax.xml.Main.Generated.cs (6)
73public virtual TResult? VisitRefType(RefTypeSyntax node) => this.DefaultVisit(node); 817public virtual void VisitRefType(RefTypeSyntax node) => this.DefaultVisit(node); 1560public override SyntaxNode? VisitRefType(RefTypeSyntax node) 2499public static RefTypeSyntax RefType(SyntaxToken refKeyword, SyntaxToken readOnlyKeyword, TypeSyntax type) 2509return (RefTypeSyntax)Syntax.InternalSyntax.SyntaxFactory.RefType((Syntax.InternalSyntax.SyntaxToken)refKeyword.Node!, (Syntax.InternalSyntax.SyntaxToken?)readOnlyKeyword.Node, (Syntax.InternalSyntax.TypeSyntax)type.Green).CreateRed(); 2513public static RefTypeSyntax RefType(TypeSyntax type)
Syntax.xml.Syntax.Generated.cs (5)
1021public RefTypeSyntax Update(SyntaxToken refKeyword, SyntaxToken readOnlyKeyword, TypeSyntax type) 1025var newNode = SyntaxFactory.RefType(refKeyword, readOnlyKeyword, type); 1033public RefTypeSyntax WithRefKeyword(SyntaxToken refKeyword) => Update(refKeyword, this.ReadOnlyKeyword, this.Type); 1034public RefTypeSyntax WithReadOnlyKeyword(SyntaxToken readOnlyKeyword) => Update(this.RefKeyword, readOnlyKeyword, this.Type); 1035public RefTypeSyntax WithType(TypeSyntax type) => Update(this.RefKeyword, this.ReadOnlyKeyword, type);
Syntax\RefTypeSyntax.cs (2)
11public RefTypeSyntax Update(SyntaxToken refKeyword, TypeSyntax type) 23public static RefTypeSyntax RefType(SyntaxToken refKeyword, TypeSyntax type)
Syntax\SyntaxExtensions.cs (2)
455var refTypeSyntax = (RefTypeSyntax)type;
Syntax\SyntaxFacts.cs (1)
154return ((RefTypeSyntax)parent).Type == node;
Syntax\SyntaxNodeExtensions.cs (4)
229/// For callers that just want to unwrap a <see cref="RefTypeSyntax"/> and don't care if ref/readonly was there. 252var refType = (RefTypeSyntax)syntax; 303if (parentNode is RefTypeSyntax refType && refType.Type == syntax)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
344if (variableDeclarationType is RefTypeSyntax refType && refType.ReadOnlyKeyword != default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
53=> type is RefTypeSyntax refType ? refType.Type : type;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
61if (declarationContext is RefTypeSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenRefLocalTests.cs (6)
4045var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4082var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4116var refInt = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
96if (typeParent is RefTypeSyntax refType)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
43if (localDeclarationStatement.Declaration.Type is RefTypeSyntax)
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (1)
411else if (type is RefTypeSyntax refType)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
61if (declarationContext is RefTypeSyntax)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\RefFieldTests.cs (21)
12151if (type is RefTypeSyntax refType) 12215if (type is RefTypeSyntax refType) 12285if (type is RefTypeSyntax refType) 12474if (type is RefTypeSyntax refType) 12506if (type is RefTypeSyntax refType) 12654if (type is RefTypeSyntax refType) 12682if (type is RefTypeSyntax refType) 12885if (type is RefTypeSyntax refType) 12919if (type is RefTypeSyntax refType) 13061if (type is RefTypeSyntax refType) 13089if (type is RefTypeSyntax refType) 13527if (type is RefTypeSyntax refType) 13591if (type is RefTypeSyntax refType) 13668if (type is RefTypeSyntax refType) 13738if (type is RefTypeSyntax refType) 14685if (type is RefTypeSyntax refType) 14929if (type is RefTypeSyntax refType) 14957if (type is RefTypeSyntax refType) 15220if (type is RefTypeSyntax refType) 27684if (type is RefTypeSyntax refType) 27774if (type is RefTypeSyntax refType)
Semantics\RefLocalsAndReturnsTests.cs (1)
5216if (type is RefTypeSyntax refType)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10417private static RefTypeSyntax GenerateRefType() 11312var node = GenerateRefType(); 11317var newNode = node.WithRefKeyword(node.RefKeyword).WithReadOnlyKeyword(node.ReadOnlyKeyword).WithType(node.Type); 14757var oldNode = GenerateRefType(); 14773var oldNode = GenerateRefType();
Parsing\DeclarationParsingTests.cs (2)
2861var rt = (RefTypeSyntax)ms.ReturnType;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
373(expression.Parent is RefTypeSyntax refType && isValidDeclaration(refType));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
275name.CheckParent<RefTypeSyntax>(v => v.Type == name) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
344if (variableDeclarationType is RefTypeSyntax refType && refType.ReadOnlyKeyword != default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
53=> type is RefTypeSyntax refType ? refType.Type : type;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
344if (variableDeclarationType is RefTypeSyntax refType && refType.ReadOnlyKeyword != default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
53=> type is RefTypeSyntax refType ? refType.Type : type;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)