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)
2903if (typeSyntax is RefTypeSyntax refType) 2945if (typeSyntax is RefTypeSyntax refType) 2996if (typeSyntax is RefTypeSyntax refType)
Binder\Binder_Symbols.cs (2)
479var refTypeSyntax = (RefTypeSyntax)syntax;
Binder\ForEachLoopBinder.cs (1)
276if (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)
456var 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)
CSharpUseImplicitTypeHelper.cs (1)
63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar))
ExpressionSyntaxExtensions.cs (1)
344if (variableDeclarationType is RefTypeSyntax refType && refType.ReadOnlyKeyword != default)
TypeSyntaxExtensions.cs (1)
53=> type is RefTypeSyntax refType ? refType.Type : type;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)
UseExplicitTypeCodeFixProvider.cs (1)
62if (declarationContext is RefTypeSyntax)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenRefLocalTests.cs (6)
3260var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 3297var refVar = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single(); 3331var refInt = tree.GetRoot().DescendantNodes().OfType<RefTypeSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (3)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
100if (type?.Parent is RefTypeSyntax)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
43if (localDeclarationStatement.Declaration.Type is RefTypeSyntax)
UseExplicitTypeCodeFixProvider.cs (1)
62if (declarationContext is RefTypeSyntax)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\RefFieldTests.cs (21)
11591if (type is RefTypeSyntax refType) 11655if (type is RefTypeSyntax refType) 11725if (type is RefTypeSyntax refType) 11914if (type is RefTypeSyntax refType) 11946if (type is RefTypeSyntax refType) 12094if (type is RefTypeSyntax refType) 12122if (type is RefTypeSyntax refType) 12325if (type is RefTypeSyntax refType) 12359if (type is RefTypeSyntax refType) 12501if (type is RefTypeSyntax refType) 12529if (type is RefTypeSyntax refType) 12967if (type is RefTypeSyntax refType) 13031if (type is RefTypeSyntax refType) 13108if (type is RefTypeSyntax refType) 13178if (type is RefTypeSyntax refType) 14125if (type is RefTypeSyntax refType) 14369if (type is RefTypeSyntax refType) 14397if (type is RefTypeSyntax refType) 14660if (type is RefTypeSyntax refType) 26312if (type is RefTypeSyntax refType) 26402if (type is RefTypeSyntax refType)
Semantics\RefLocalsAndReturnsTests.cs (1)
4821if (type is RefTypeSyntax refType)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10043private static RefTypeSyntax GenerateRefType() 10911var node = GenerateRefType(); 10916var newNode = node.WithRefKeyword(node.RefKeyword).WithReadOnlyKeyword(node.ReadOnlyKeyword).WithType(node.Type); 14243var oldNode = GenerateRefType(); 14259var 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)
304name.CheckParent<RefTypeSyntax>(v => v.Type == name) ||
CSharpTypeInferenceService.TypeInferrer.cs (1)
95if (node is RefTypeSyntax refType)
CSharpUseImplicitTypeHelper.cs (1)
63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
344if (variableDeclarationType is RefTypeSyntax refType && refType.ReadOnlyKeyword != default)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
53=> type is RefTypeSyntax refType ? refType.Type : type;