45 references to IsInTypeOnlyContext
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
76if (SyntaxFacts.IsInTypeOnlyContext(id) && 156if (SyntaxFacts.IsInTypeOnlyContext(expression) &&
Binder\Binder_Symbols.cs (1)
951if (SyntaxFacts.IsInTypeOnlyContext(node))
Compilation\CSharpSemanticModel.cs (1)
1621if (parentExpr != null && !(parentExpr.Parent is XmlNameAttributeSyntax) && !SyntaxFacts.IsInTypeOnlyContext(parentExpr) && !binder.IsInsideNameof)
Compilation\SyntaxTreeSemanticModel.cs (1)
349else if (SyntaxFacts.IsInTypeOnlyContext(type))
Compiler\MethodCompiler.cs (2)
2204if (SyntaxFacts.IsInTypeOnlyContext(expression) && 2244if (SyntaxFacts.IsInTypeOnlyContext(id) &&
Syntax\SyntaxExtensions.cs (1)
199return SyntaxFacts.IsInTypeOnlyContext(typeNode) && IsInContextWhichNeedsDynamicAttribute(typeNode);
Syntax\SyntaxFacts.cs (1)
261return IsInTypeOnlyContext(node);
Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers (1)
CSharpRestrictedInternalsVisibleToAnalyzer.cs (1)
23=> SyntaxFacts.IsInTypeOnlyContext(node);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
332return SyntaxFacts.IsInTypeOnlyContext(originalName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
698SyntaxFacts.IsInTypeOnlyContext(typedParent) &&
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\OutVarTests.cs (1)
1037Assert.True(SyntaxFacts.IsInTypeOnlyContext(typeSyntax));
Semantics\PatternMatchingTestBase.cs (2)
104Assert.True(SyntaxFacts.IsInTypeOnlyContext(typeSyntax)); 271Assert.True(SyntaxFacts.IsInTypeOnlyContext(typeSyntax));
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
332return SyntaxFacts.IsInTypeOnlyContext(originalName)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\RefFieldTests.cs (27)
12105Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12106Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12107Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12239Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12240Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12241Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12428Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12429Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12430Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12460Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12461Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12462Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12839Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12840Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12841Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12873Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12874Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12875Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 14639Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 14640Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 14641Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 27581Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 27582Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 27583Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 27671Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 27672Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 27673Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef()));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
698SyntaxFacts.IsInTypeOnlyContext(typedParent) &&
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
698SyntaxFacts.IsInTypeOnlyContext(typedParent) &&