68 references to RefTypeSyntax
Microsoft.CodeAnalysis.CSharp (19)
Binder\Binder_Deconstruct.cs (3)
828if (typeSyntax is RefTypeSyntax refType) 886if (typeSyntax is RefTypeSyntax refType) 936if (typeSyntax is RefTypeSyntax refType)
Binder\Binder_Expressions.cs (3)
3122if (typeSyntax is RefTypeSyntax refType) 3164if (typeSyntax is RefTypeSyntax refType) 3215if (typeSyntax is RefTypeSyntax refType)
Binder\Binder_Symbols.cs (2)
481var refTypeSyntax = (RefTypeSyntax)syntax;
Binder\ForEachLoopBinder.cs (1)
291if (typeSyntax is RefTypeSyntax refType)
Binder\ForLoopBinder.cs (1)
77if (type is RefTypeSyntax)
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 (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
345if (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\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
59if (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)
4036var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4073var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 4107var refInt = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (3)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
96if (typeParent is RefTypeSyntax refType)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
43if (localDeclarationStatement.Declaration.Type is RefTypeSyntax)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
59if (declarationContext is RefTypeSyntax)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\RefFieldTests.cs (21)
12084if (type is RefTypeSyntax refType) 12148if (type is RefTypeSyntax refType) 12218if (type is RefTypeSyntax refType) 12407if (type is RefTypeSyntax refType) 12439if (type is RefTypeSyntax refType) 12587if (type is RefTypeSyntax refType) 12615if (type is RefTypeSyntax refType) 12818if (type is RefTypeSyntax refType) 12852if (type is RefTypeSyntax refType) 12994if (type is RefTypeSyntax refType) 13022if (type is RefTypeSyntax refType) 13460if (type is RefTypeSyntax refType) 13524if (type is RefTypeSyntax refType) 13601if (type is RefTypeSyntax refType) 13671if (type is RefTypeSyntax refType) 14618if (type is RefTypeSyntax refType) 14862if (type is RefTypeSyntax refType) 14890if (type is RefTypeSyntax refType) 15153if (type is RefTypeSyntax refType) 27067if (type is RefTypeSyntax refType) 27157if (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)
10283private static RefTypeSyntax GenerateRefType() 11169var node = GenerateRefType(); 11174var newNode = node.WithRefKeyword(node.RefKeyword).WithReadOnlyKeyword(node.ReadOnlyKeyword).WithType(node.Type); 14567var oldNode = GenerateRefType(); 14583var 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 (5)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
272name.CheckParent<RefTypeSyntax>(v => v.Type == name) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
345if (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\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)