using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class ConversionOperatorMemberCrefSyntax : MemberCrefSyntax { private TypeSyntax? type; private CrefParameterListSyntax? parameters; public SyntaxToken ImplicitOrExplicitKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ConversionOperatorMemberCrefSyntax)(object)((SyntaxNode)this).Green).implicitOrExplicitKeyword, ((SyntaxNode)this).Position, 0); public SyntaxToken OperatorKeyword => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ConversionOperatorMemberCrefSyntax)(object)((SyntaxNode)this).Green).operatorKeyword, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1)); public SyntaxToken CheckedKeyword { get { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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) SyntaxToken checkedKeyword = ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.ConversionOperatorMemberCrefSyntax)(object)((SyntaxNode)this).Green).checkedKeyword; if (checkedKeyword == null) { return default(SyntaxToken); } return new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)checkedKeyword, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2)); } } public TypeSyntax Type => ((SyntaxNode)this).GetRed(ref type, 3); public CrefParameterListSyntax? Parameters => ((SyntaxNode)this).GetRed(ref parameters, 4); public ConversionOperatorMemberCrefSyntax Update(SyntaxToken implicitOrExplicitKeyword, SyntaxToken operatorKeyword, TypeSyntax type, CrefParameterListSyntax? parameters) { //IL_0001: 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_0004: Unknown result type (might be due to invalid IL or missing references) return Update(implicitOrExplicitKeyword, operatorKeyword, CheckedKeyword, type, parameters); } internal ConversionOperatorMemberCrefSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position) : base(green, parent, position) { } internal override SyntaxNode? GetNodeSlot(int index) { return (SyntaxNode?)(index switch { 3 => ((SyntaxNode)this).GetRed(ref type, 3), 4 => ((SyntaxNode)this).GetRed(ref parameters, 4), _ => null, }); } internal override SyntaxNode? GetCachedSlot(int index) { return (SyntaxNode?)(index switch { 3 => type, 4 => parameters, _ => null, }); } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitConversionOperatorMemberCref(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitConversionOperatorMemberCref(this); } public ConversionOperatorMemberCrefSyntax Update(SyntaxToken implicitOrExplicitKeyword, SyntaxToken operatorKeyword, SyntaxToken checkedKeyword, TypeSyntax type, CrefParameterListSyntax? parameters) { //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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 (implicitOrExplicitKeyword != ImplicitOrExplicitKeyword || operatorKeyword != OperatorKeyword || checkedKeyword != CheckedKeyword || type != Type || parameters != Parameters) { ConversionOperatorMemberCrefSyntax conversionOperatorMemberCrefSyntax = SyntaxFactory.ConversionOperatorMemberCref(implicitOrExplicitKeyword, operatorKeyword, checkedKeyword, type, parameters); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return conversionOperatorMemberCrefSyntax; } return conversionOperatorMemberCrefSyntax.WithAnnotations(annotations); } return this; } public ConversionOperatorMemberCrefSyntax WithImplicitOrExplicitKeyword(SyntaxToken implicitOrExplicitKeyword) { //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(implicitOrExplicitKeyword, OperatorKeyword, CheckedKeyword, Type, Parameters); } public ConversionOperatorMemberCrefSyntax WithOperatorKeyword(SyntaxToken operatorKeyword) { //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(ImplicitOrExplicitKeyword, operatorKeyword, CheckedKeyword, Type, Parameters); } public ConversionOperatorMemberCrefSyntax WithCheckedKeyword(SyntaxToken checkedKeyword) { //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(ImplicitOrExplicitKeyword, OperatorKeyword, checkedKeyword, Type, Parameters); } public ConversionOperatorMemberCrefSyntax WithType(TypeSyntax type) { //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_000e: Unknown result type (might be due to invalid IL or missing references) return Update(ImplicitOrExplicitKeyword, OperatorKeyword, CheckedKeyword, type, Parameters); } public ConversionOperatorMemberCrefSyntax WithParameters(CrefParameterListSyntax? parameters) { //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_000e: Unknown result type (might be due to invalid IL or missing references) return Update(ImplicitOrExplicitKeyword, OperatorKeyword, CheckedKeyword, Type, parameters); } public ConversionOperatorMemberCrefSyntax AddParametersParameters(params CrefParameterSyntax[] items) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) CrefParameterListSyntax crefParameterListSyntax = Parameters ?? SyntaxFactory.CrefParameterList(); return WithParameters(crefParameterListSyntax.WithParameters(crefParameterListSyntax.Parameters.AddRange((IEnumerable)items))); } }