Files
2026-08-27 10:56:38 -06:00

104 lines
3.7 KiB
C#

using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax;
namespace Microsoft.CodeAnalysis.CSharp.Syntax;
public sealed class OrderByClauseSyntax : QueryClauseSyntax
{
private SyntaxNode? orderings;
public SyntaxToken OrderByKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.OrderByClauseSyntax)(object)((SyntaxNode)this).Green).orderByKeyword, ((SyntaxNode)this).Position, 0);
public SeparatedSyntaxList<OrderingSyntax> Orderings
{
get
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
SyntaxNode red = ((SyntaxNode)this).GetRed(ref orderings, 1);
if (red == null)
{
return default(SeparatedSyntaxList<OrderingSyntax>);
}
return new SeparatedSyntaxList<OrderingSyntax>(red, ((SyntaxNode)this).GetChildIndex(1));
}
}
internal OrderByClauseSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position)
: base(green, parent, position)
{
}
internal override SyntaxNode? GetNodeSlot(int index)
{
if (index != 1)
{
return null;
}
return ((SyntaxNode)this).GetRed(ref orderings, 1);
}
internal override SyntaxNode? GetCachedSlot(int index)
{
if (index != 1)
{
return null;
}
return orderings;
}
public override void Accept(CSharpSyntaxVisitor visitor)
{
visitor.VisitOrderByClause(this);
}
public override TResult? Accept<TResult>(CSharpSyntaxVisitor<TResult> visitor)
{
return visitor.VisitOrderByClause(this);
}
public OrderByClauseSyntax Update(SyntaxToken orderByKeyword, SeparatedSyntaxList<OrderingSyntax> orderings)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
if (orderByKeyword != OrderByKeyword || orderings != Orderings)
{
OrderByClauseSyntax orderByClauseSyntax = SyntaxFactory.OrderByClause(orderByKeyword, orderings);
SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations();
if (annotations == null || annotations.Length == 0)
{
return orderByClauseSyntax;
}
return orderByClauseSyntax.WithAnnotations(annotations);
}
return this;
}
public OrderByClauseSyntax WithOrderByKeyword(SyntaxToken orderByKeyword)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
return Update(orderByKeyword, Orderings);
}
public OrderByClauseSyntax WithOrderings(SeparatedSyntaxList<OrderingSyntax> orderings)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return Update(OrderByKeyword, orderings);
}
public OrderByClauseSyntax AddOrderings(params OrderingSyntax[] items)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: 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)
return WithOrderings(Orderings.AddRange((IEnumerable<OrderingSyntax>)items));
}
}