23 references to UnsafeKeyword
Microsoft.CodeAnalysis.CSharp (16)
Symbols\AliasSymbol.cs (4)
375
if (usingDirective.
UnsafeKeyword
!= default)
377
MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.
UnsafeKeyword
);
386
if (usingDirective.
UnsafeKeyword
!= default)
388
this.CheckUnsafeModifier(DeclarationModifiers.Unsafe, usingDirective.
UnsafeKeyword
.GetLocation(), diagnostics);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
736
if (usingDirective.
UnsafeKeyword
!= default)
738
var unsafeKeywordLocation = usingDirective.
UnsafeKeyword
.GetLocation();
Syntax.xml.Main.Generated.cs (1)
1963
=> node.Update(VisitToken(node.GlobalKeyword), VisitToken(node.UsingKeyword), VisitToken(node.StaticKeyword), VisitToken(node.
UnsafeKeyword
), (NameEqualsSyntax?)Visit(node.Alias), (TypeSyntax?)Visit(node.NamespaceOrType) ?? throw new ArgumentNullException("namespaceOrType"), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (7)
9442
if (globalKeyword != this.GlobalKeyword || usingKeyword != this.UsingKeyword || staticKeyword != this.StaticKeyword || unsafeKeyword != this.
UnsafeKeyword
|| alias != this.Alias || namespaceOrType != this.NamespaceOrType || semicolonToken != this.SemicolonToken)
9452
public UsingDirectiveSyntax WithGlobalKeyword(SyntaxToken globalKeyword) => Update(globalKeyword, this.UsingKeyword, this.StaticKeyword, this.
UnsafeKeyword
, this.Alias, this.NamespaceOrType, this.SemicolonToken);
9453
public UsingDirectiveSyntax WithUsingKeyword(SyntaxToken usingKeyword) => Update(this.GlobalKeyword, usingKeyword, this.StaticKeyword, this.
UnsafeKeyword
, this.Alias, this.NamespaceOrType, this.SemicolonToken);
9454
public UsingDirectiveSyntax WithStaticKeyword(SyntaxToken staticKeyword) => Update(this.GlobalKeyword, this.UsingKeyword, staticKeyword, this.
UnsafeKeyword
, this.Alias, this.NamespaceOrType, this.SemicolonToken);
9456
public UsingDirectiveSyntax WithAlias(NameEqualsSyntax? alias) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, this.
UnsafeKeyword
, alias, this.NamespaceOrType, this.SemicolonToken);
9457
public UsingDirectiveSyntax WithNamespaceOrType(TypeSyntax namespaceOrType) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, this.
UnsafeKeyword
, this.Alias, namespaceOrType, this.SemicolonToken);
9458
public UsingDirectiveSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.GlobalKeyword, this.UsingKeyword, this.StaticKeyword, this.
UnsafeKeyword
, this.Alias, this.NamespaceOrType, semicolonToken);
Syntax\UsingDirectiveSyntax.cs (2)
22
=> this.Update(this.GlobalKeyword, usingKeyword, staticKeyword, this.
UnsafeKeyword
, alias, namespaceOrType: name, semicolonToken);
25
=> this.Update(globalKeyword, usingKeyword, staticKeyword, this.
UnsafeKeyword
, alias, namespaceOrType: name, semicolonToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
508
targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.
UnsafeKeyword
.IsKind(SyntaxKind.UnsafeKeyword));
Microsoft.CodeAnalysis.CSharp.Features (2)
EditAndContinue\SyntaxComparer.cs (2)
849
if (leftUsing.
UnsafeKeyword
.IsKind(SyntaxKind.None) != rightUsing.
UnsafeKeyword
.IsKind(SyntaxKind.None))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Generated\Syntax.Test.xml.Generated.cs (2)
12981
Assert.Equal(SyntaxKind.None, node.
UnsafeKeyword
.Kind());
12985
var newNode = node.WithGlobalKeyword(node.GlobalKeyword).WithUsingKeyword(node.UsingKeyword).WithStaticKeyword(node.StaticKeyword).WithUnsafeKeyword(node.
UnsafeKeyword
).WithAlias(node.Alias).WithNamespaceOrType(node.NamespaceOrType).WithSemicolonToken(node.SemicolonToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
508
targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.
UnsafeKeyword
.IsKind(SyntaxKind.UnsafeKeyword));
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
508
targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.
UnsafeKeyword
.IsKind(SyntaxKind.UnsafeKeyword));