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)
949if (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)
2188if (SyntaxFacts.IsInTypeOnlyContext(expression) && 2228if (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)
334return SyntaxFacts.IsInTypeOnlyContext(originalName)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
699SyntaxFacts.IsInTypeOnlyContext(typedParent) &&
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Semantics\OutVarTests.cs (1)
1039Assert.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)
334return SyntaxFacts.IsInTypeOnlyContext(originalName)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\RefFieldTests.cs (27)
12142Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12143Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12144Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12276Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12277Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12278Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12465Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12466Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12467Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12497Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12498Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12499Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12876Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12877Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12878Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 12910Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 12911Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 12912Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 14676Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 14677Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 14678Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 27675Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 27676Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 27677Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef())); 27765Assert.True(SyntaxFacts.IsInTypeOnlyContext(type)); 27766Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _))); 27767Assert.True(SyntaxFacts.IsInTypeOnlyContext(type.SkipScoped(out _).SkipRef()));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
699SyntaxFacts.IsInTypeOnlyContext(typedParent) &&
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
699SyntaxFacts.IsInTypeOnlyContext(typedParent) &&