76 lines
2.5 KiB
C#
76 lines
2.5 KiB
C#
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
public sealed class ExplicitInterfaceSpecifierSyntax : CSharpSyntaxNode
|
|
{
|
|
private NameSyntax? name;
|
|
|
|
public NameSyntax Name => ((SyntaxNode)this).GetRedAtZero<NameSyntax>(ref name);
|
|
|
|
public SyntaxToken DotToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ExplicitInterfaceSpecifierSyntax)(object)((SyntaxNode)this).Green).dotToken, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1));
|
|
|
|
internal ExplicitInterfaceSpecifierSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position)
|
|
: base((GreenNode)(object)green, parent, position)
|
|
{
|
|
}
|
|
|
|
internal override SyntaxNode? GetNodeSlot(int index)
|
|
{
|
|
if (index != 0)
|
|
{
|
|
return null;
|
|
}
|
|
return (SyntaxNode?)(object)((SyntaxNode)this).GetRedAtZero<NameSyntax>(ref name);
|
|
}
|
|
|
|
internal override SyntaxNode? GetCachedSlot(int index)
|
|
{
|
|
if (index != 0)
|
|
{
|
|
return null;
|
|
}
|
|
return (SyntaxNode?)(object)name;
|
|
}
|
|
|
|
public override void Accept(CSharpSyntaxVisitor visitor)
|
|
{
|
|
visitor.VisitExplicitInterfaceSpecifier(this);
|
|
}
|
|
|
|
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
|
|
{
|
|
return visitor.VisitExplicitInterfaceSpecifier(this);
|
|
}
|
|
|
|
public ExplicitInterfaceSpecifierSyntax Update(NameSyntax name, SyntaxToken dotToken)
|
|
{
|
|
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
|
|
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
|
|
if (name != Name || dotToken != DotToken)
|
|
{
|
|
ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifierSyntax = SyntaxFactory.ExplicitInterfaceSpecifier(name, dotToken);
|
|
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
|
|
if (annotations == null || annotations.Length == 0)
|
|
{
|
|
return explicitInterfaceSpecifierSyntax;
|
|
}
|
|
return explicitInterfaceSpecifierSyntax.WithAnnotations(annotations);
|
|
}
|
|
return this;
|
|
}
|
|
|
|
public ExplicitInterfaceSpecifierSyntax WithName(NameSyntax name)
|
|
{
|
|
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(name, DotToken);
|
|
}
|
|
|
|
public ExplicitInterfaceSpecifierSyntax WithDotToken(SyntaxToken dotToken)
|
|
{
|
|
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
|
|
return Update(Name, dotToken);
|
|
}
|
|
}
|