using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class ParameterListSyntax : BaseParameterListSyntax { private SyntaxNode? parameters; internal int ParameterCount { get { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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) //IL_0010: Unknown result type (might be due to invalid IL or missing references) int num = 0; Enumerator enumerator = Parameters.GetEnumerator(); while (enumerator.MoveNext()) { if (!enumerator.Current.IsArgList) { num++; } } return num; } } public SyntaxToken OpenParenToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ParameterListSyntax)(object)((SyntaxNode)this).Green).openParenToken, ((SyntaxNode)this).Position, 0); public override SeparatedSyntaxList Parameters { 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 parameters, 1); if (red == null) { return default(SeparatedSyntaxList); } return new SeparatedSyntaxList(red, ((SyntaxNode)this).GetChildIndex(1)); } } public SyntaxToken CloseParenToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ParameterListSyntax)(object)((SyntaxNode)this).Green).closeParenToken, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2)); internal ParameterListSyntax(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 parameters, 1); } internal override SyntaxNode? GetCachedSlot(int index) { if (index != 1) { return null; } return parameters; } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitParameterList(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitParameterList(this); } public ParameterListSyntax Update(SyntaxToken openParenToken, SeparatedSyntaxList parameters, SyntaxToken closeParenToken) { //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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (openParenToken != OpenParenToken || parameters != Parameters || closeParenToken != CloseParenToken) { ParameterListSyntax parameterListSyntax = SyntaxFactory.ParameterList(openParenToken, parameters, closeParenToken); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return parameterListSyntax; } return parameterListSyntax.WithAnnotations(annotations); } return this; } public ParameterListSyntax WithOpenParenToken(SyntaxToken openParenToken) { //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) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return Update(openParenToken, Parameters, CloseParenToken); } internal override BaseParameterListSyntax WithParametersCore(SeparatedSyntaxList parameters) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return WithParameters(parameters); } public new ParameterListSyntax WithParameters(SeparatedSyntaxList parameters) { //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_0009: Unknown result type (might be due to invalid IL or missing references) return Update(OpenParenToken, parameters, CloseParenToken); } public ParameterListSyntax WithCloseParenToken(SyntaxToken closeParenToken) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return Update(OpenParenToken, Parameters, closeParenToken); } internal override BaseParameterListSyntax AddParametersCore(params ParameterSyntax[] items) { return AddParameters(items); } public new ParameterListSyntax AddParameters(params ParameterSyntax[] 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 WithParameters(Parameters.AddRange((IEnumerable)items)); } }