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

3273 lines
193 KiB
C#

using System;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.PooledObjects;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Operations;
internal sealed class CSharpOperationFactory
{
internal class Helper
{
internal static bool IsPostfixIncrementOrDecrement(UnaryOperatorKind operatorKind)
{
UnaryOperatorKind unaryOperatorKind = operatorKind.Operator();
if (unaryOperatorKind == UnaryOperatorKind.PostfixIncrement || unaryOperatorKind == UnaryOperatorKind.PostfixDecrement)
{
return true;
}
return false;
}
internal static bool IsDecrement(UnaryOperatorKind operatorKind)
{
UnaryOperatorKind unaryOperatorKind = operatorKind.Operator();
if (unaryOperatorKind == UnaryOperatorKind.PostfixDecrement || unaryOperatorKind == UnaryOperatorKind.PrefixDecrement)
{
return true;
}
return false;
}
internal static UnaryOperatorKind DeriveUnaryOperatorKind(UnaryOperatorKind operatorKind)
{
return (UnaryOperatorKind)(operatorKind.Operator() switch
{
UnaryOperatorKind.UnaryPlus => 3,
UnaryOperatorKind.UnaryMinus => 4,
UnaryOperatorKind.LogicalNegation => 2,
UnaryOperatorKind.BitwiseComplement => 1,
UnaryOperatorKind.True => 5,
UnaryOperatorKind.False => 6,
_ => 0,
});
}
internal static BinaryOperatorKind DeriveBinaryOperatorKind(BinaryOperatorKind operatorKind)
{
return (BinaryOperatorKind)(operatorKind.OperatorWithLogical() switch
{
BinaryOperatorKind.Addition => 1,
BinaryOperatorKind.Subtraction => 2,
BinaryOperatorKind.Multiplication => 3,
BinaryOperatorKind.Division => 4,
BinaryOperatorKind.Remainder => 6,
BinaryOperatorKind.LeftShift => 8,
BinaryOperatorKind.RightShift => 9,
BinaryOperatorKind.UnsignedRightShift => 25,
BinaryOperatorKind.And => 10,
BinaryOperatorKind.Or => 11,
BinaryOperatorKind.Xor => 12,
BinaryOperatorKind.LessThan => 20,
BinaryOperatorKind.LessThanOrEqual => 21,
BinaryOperatorKind.Equal => 16,
BinaryOperatorKind.NotEqual => 18,
BinaryOperatorKind.GreaterThanOrEqual => 22,
BinaryOperatorKind.GreaterThan => 23,
BinaryOperatorKind.LogicalAnd => 13,
BinaryOperatorKind.LogicalOr => 14,
_ => 0,
});
}
}
private readonly SemanticModel _semanticModel;
public CSharpOperationFactory(SemanticModel semanticModel)
{
_semanticModel = semanticModel;
}
[return: NotNullIfNotNull("boundNode")]
public IOperation? Create(BoundNode? boundNode)
{
//IL_0a70: Unknown result type (might be due to invalid IL or missing references)
//IL_0a76: Expected O, but got Unknown
if (boundNode == null)
{
return null;
}
switch (boundNode.Kind)
{
case BoundKind.DeconstructValuePlaceholder:
return (IOperation?)(object)CreateBoundDeconstructValuePlaceholderOperation((BoundDeconstructValuePlaceholder)boundNode);
case BoundKind.DeconstructionAssignmentOperator:
return (IOperation?)(object)CreateBoundDeconstructionAssignmentOperator((BoundDeconstructionAssignmentOperator)boundNode);
case BoundKind.Call:
return CreateBoundCallOperation((BoundCall)boundNode);
case BoundKind.Local:
return CreateBoundLocalOperation((BoundLocal)boundNode);
case BoundKind.FieldAccess:
return CreateBoundFieldAccessOperation((BoundFieldAccess)boundNode);
case BoundKind.PropertyAccess:
return (IOperation?)(object)CreateBoundPropertyAccessOperation((BoundPropertyAccess)boundNode);
case BoundKind.IndexerAccess:
return CreateBoundIndexerAccessOperation((BoundIndexerAccess)boundNode);
case BoundKind.EventAccess:
return (IOperation?)(object)CreateBoundEventAccessOperation((BoundEventAccess)boundNode);
case BoundKind.EventAssignmentOperator:
return (IOperation?)(object)CreateBoundEventAssignmentOperatorOperation((BoundEventAssignmentOperator)boundNode);
case BoundKind.Parameter:
return (IOperation?)(object)CreateBoundParameterOperation((BoundParameter)boundNode);
case BoundKind.Literal:
return (IOperation?)(object)CreateBoundLiteralOperation((BoundLiteral)boundNode);
case BoundKind.Utf8String:
return (IOperation?)(object)CreateBoundUtf8StringOperation((BoundUtf8String)boundNode);
case BoundKind.DynamicInvocation:
return (IOperation?)(object)CreateBoundDynamicInvocationExpressionOperation((BoundDynamicInvocation)boundNode);
case BoundKind.DynamicIndexerAccess:
return (IOperation?)(object)CreateBoundDynamicIndexerAccessExpressionOperation((BoundDynamicIndexerAccess)boundNode);
case BoundKind.ObjectCreationExpression:
return CreateBoundObjectCreationExpressionOperation((BoundObjectCreationExpression)boundNode);
case BoundKind.WithExpression:
return CreateBoundWithExpressionOperation((BoundWithExpression)boundNode);
case BoundKind.DynamicObjectCreationExpression:
return (IOperation?)(object)CreateBoundDynamicObjectCreationExpressionOperation((BoundDynamicObjectCreationExpression)boundNode);
case BoundKind.ObjectInitializerExpression:
return (IOperation?)(object)CreateBoundObjectInitializerExpressionOperation((BoundObjectInitializerExpression)boundNode);
case BoundKind.CollectionInitializerExpression:
return (IOperation?)(object)CreateBoundCollectionInitializerExpressionOperation((BoundCollectionInitializerExpression)boundNode);
case BoundKind.ObjectInitializerMember:
return CreateBoundObjectInitializerMemberOperation((BoundObjectInitializerMember)boundNode);
case BoundKind.CollectionElementInitializer:
return CreateBoundCollectionElementInitializerOperation((BoundCollectionElementInitializer)boundNode);
case BoundKind.DynamicObjectInitializerMember:
return CreateBoundDynamicObjectInitializerMemberOperation((BoundDynamicObjectInitializerMember)boundNode);
case BoundKind.DynamicMemberAccess:
return (IOperation?)(object)CreateBoundDynamicMemberAccessOperation((BoundDynamicMemberAccess)boundNode);
case BoundKind.DynamicCollectionElementInitializer:
return (IOperation?)(object)CreateBoundDynamicCollectionElementInitializerOperation((BoundDynamicCollectionElementInitializer)boundNode);
case BoundKind.UnboundLambda:
return CreateUnboundLambdaOperation((UnboundLambda)boundNode);
case BoundKind.Lambda:
return (IOperation?)(object)CreateBoundLambdaOperation((BoundLambda)boundNode);
case BoundKind.Conversion:
return CreateBoundConversionOperation((BoundConversion)boundNode);
case BoundKind.AsOperator:
return (IOperation?)(object)CreateBoundAsOperatorOperation((BoundAsOperator)boundNode);
case BoundKind.IsOperator:
return (IOperation?)(object)CreateBoundIsOperatorOperation((BoundIsOperator)boundNode);
case BoundKind.SizeOfOperator:
return (IOperation?)(object)CreateBoundSizeOfOperatorOperation((BoundSizeOfOperator)boundNode);
case BoundKind.TypeOfOperator:
return (IOperation?)(object)CreateBoundTypeOfOperatorOperation((BoundTypeOfOperator)boundNode);
case BoundKind.ArrayCreation:
return (IOperation?)(object)CreateBoundArrayCreationOperation((BoundArrayCreation)boundNode);
case BoundKind.ArrayInitialization:
return (IOperation?)(object)CreateBoundArrayInitializationOperation((BoundArrayInitialization)boundNode);
case BoundKind.CollectionExpression:
return CreateBoundCollectionExpression((BoundCollectionExpression)boundNode);
case BoundKind.CollectionExpressionSpreadElement:
return CreateBoundCollectionExpressionSpreadElement((BoundCollectionExpressionSpreadElement)boundNode);
case BoundKind.DefaultLiteral:
return (IOperation?)(object)CreateBoundDefaultLiteralOperation((BoundDefaultLiteral)boundNode);
case BoundKind.DefaultExpression:
return (IOperation?)(object)CreateBoundDefaultExpressionOperation((BoundDefaultExpression)boundNode);
case BoundKind.BaseReference:
return (IOperation?)(object)CreateBoundBaseReferenceOperation((BoundBaseReference)boundNode);
case BoundKind.ThisReference:
return (IOperation?)(object)CreateBoundThisReferenceOperation((BoundThisReference)boundNode);
case BoundKind.AssignmentOperator:
return CreateBoundAssignmentOperatorOrMemberInitializerOperation((BoundAssignmentOperator)boundNode);
case BoundKind.CompoundAssignmentOperator:
return (IOperation?)(object)CreateBoundCompoundAssignmentOperatorOperation((BoundCompoundAssignmentOperator)boundNode);
case BoundKind.IncrementOperator:
return (IOperation?)(object)CreateBoundIncrementOperatorOperation((BoundIncrementOperator)boundNode);
case BoundKind.BadExpression:
return (IOperation?)(object)CreateBoundBadExpressionOperation((BoundBadExpression)boundNode);
case BoundKind.NewT:
return (IOperation?)(object)CreateBoundNewTOperation((BoundNewT)boundNode);
case BoundKind.NoPiaObjectCreationExpression:
return (IOperation?)(object)CreateNoPiaObjectCreationExpressionOperation((BoundNoPiaObjectCreationExpression)boundNode);
case BoundKind.UnaryOperator:
return (IOperation?)(object)CreateBoundUnaryOperatorOperation((BoundUnaryOperator)boundNode);
case BoundKind.BinaryOperator:
case BoundKind.UserDefinedConditionalLogicalOperator:
return CreateBoundBinaryOperatorBase((BoundBinaryOperatorBase)boundNode);
case BoundKind.TupleBinaryOperator:
return (IOperation?)(object)CreateBoundTupleBinaryOperatorOperation((BoundTupleBinaryOperator)boundNode);
case BoundKind.ConditionalOperator:
return (IOperation?)(object)CreateBoundConditionalOperatorOperation((BoundConditionalOperator)boundNode);
case BoundKind.NullCoalescingOperator:
return (IOperation?)(object)CreateBoundNullCoalescingOperatorOperation((BoundNullCoalescingOperator)boundNode);
case BoundKind.AwaitExpression:
return (IOperation?)(object)CreateBoundAwaitExpressionOperation((BoundAwaitExpression)boundNode);
case BoundKind.ArrayAccess:
return (IOperation?)(object)CreateBoundArrayAccessOperation((BoundArrayAccess)boundNode);
case BoundKind.ImplicitIndexerAccess:
return CreateBoundImplicitIndexerAccessOperation((BoundImplicitIndexerAccess)boundNode);
case BoundKind.InlineArrayAccess:
return (IOperation?)(object)CreateBoundInlineArrayAccessOperation((BoundInlineArrayAccess)boundNode);
case BoundKind.NameOfOperator:
return (IOperation?)(object)CreateBoundNameOfOperatorOperation((BoundNameOfOperator)boundNode);
case BoundKind.ThrowExpression:
return (IOperation?)(object)CreateBoundThrowExpressionOperation((BoundThrowExpression)boundNode);
case BoundKind.AddressOfOperator:
return (IOperation?)(object)CreateBoundAddressOfOperatorOperation((BoundAddressOfOperator)boundNode);
case BoundKind.ImplicitReceiver:
return (IOperation?)(object)CreateBoundImplicitReceiverOperation((BoundImplicitReceiver)boundNode);
case BoundKind.ConditionalAccess:
return (IOperation?)(object)CreateBoundConditionalAccessOperation((BoundConditionalAccess)boundNode);
case BoundKind.ConditionalReceiver:
return (IOperation?)(object)CreateBoundConditionalReceiverOperation((BoundConditionalReceiver)boundNode);
case BoundKind.FieldEqualsValue:
return (IOperation?)(object)CreateBoundFieldEqualsValueOperation((BoundFieldEqualsValue)boundNode);
case BoundKind.PropertyEqualsValue:
return (IOperation?)(object)CreateBoundPropertyEqualsValueOperation((BoundPropertyEqualsValue)boundNode);
case BoundKind.ParameterEqualsValue:
return (IOperation?)(object)CreateBoundParameterEqualsValueOperation((BoundParameterEqualsValue)boundNode);
case BoundKind.Block:
return (IOperation?)(object)CreateBoundBlockOperation((BoundBlock)boundNode);
case BoundKind.ContinueStatement:
return (IOperation?)(object)CreateBoundContinueStatementOperation((BoundContinueStatement)boundNode);
case BoundKind.BreakStatement:
return (IOperation?)(object)CreateBoundBreakStatementOperation((BoundBreakStatement)boundNode);
case BoundKind.YieldBreakStatement:
return (IOperation?)(object)CreateBoundYieldBreakStatementOperation((BoundYieldBreakStatement)boundNode);
case BoundKind.GotoStatement:
return (IOperation?)(object)CreateBoundGotoStatementOperation((BoundGotoStatement)boundNode);
case BoundKind.NoOpStatement:
return (IOperation?)(object)CreateBoundNoOpStatementOperation((BoundNoOpStatement)boundNode);
case BoundKind.IfStatement:
return (IOperation?)(object)CreateBoundIfStatementOperation((BoundIfStatement)boundNode);
case BoundKind.WhileStatement:
return (IOperation?)(object)CreateBoundWhileStatementOperation((BoundWhileStatement)boundNode);
case BoundKind.DoStatement:
return (IOperation?)(object)CreateBoundDoStatementOperation((BoundDoStatement)boundNode);
case BoundKind.ForStatement:
return (IOperation?)(object)CreateBoundForStatementOperation((BoundForStatement)boundNode);
case BoundKind.ForEachStatement:
return (IOperation?)(object)CreateBoundForEachStatementOperation((BoundForEachStatement)boundNode);
case BoundKind.TryStatement:
return (IOperation?)(object)CreateBoundTryStatementOperation((BoundTryStatement)boundNode);
case BoundKind.CatchBlock:
return (IOperation?)(object)CreateBoundCatchBlockOperation((BoundCatchBlock)boundNode);
case BoundKind.FixedStatement:
return (IOperation?)(object)CreateBoundFixedStatementOperation((BoundFixedStatement)boundNode);
case BoundKind.UsingStatement:
return (IOperation?)(object)CreateBoundUsingStatementOperation((BoundUsingStatement)boundNode);
case BoundKind.ThrowStatement:
return (IOperation?)(object)CreateBoundThrowStatementOperation((BoundThrowStatement)boundNode);
case BoundKind.ReturnStatement:
return (IOperation?)(object)CreateBoundReturnStatementOperation((BoundReturnStatement)boundNode);
case BoundKind.YieldReturnStatement:
return (IOperation?)(object)CreateBoundYieldReturnStatementOperation((BoundYieldReturnStatement)boundNode);
case BoundKind.LockStatement:
return (IOperation?)(object)CreateBoundLockStatementOperation((BoundLockStatement)boundNode);
case BoundKind.BadStatement:
return (IOperation?)(object)CreateBoundBadStatementOperation((BoundBadStatement)boundNode);
case BoundKind.LocalDeclaration:
return CreateBoundLocalDeclarationOperation((BoundLocalDeclaration)boundNode);
case BoundKind.MultipleLocalDeclarations:
case BoundKind.UsingLocalDeclarations:
return CreateBoundMultipleLocalDeclarationsBaseOperation((BoundMultipleLocalDeclarationsBase)boundNode);
case BoundKind.LabelStatement:
return (IOperation?)(object)CreateBoundLabelStatementOperation((BoundLabelStatement)boundNode);
case BoundKind.LabeledStatement:
return (IOperation?)(object)CreateBoundLabeledStatementOperation((BoundLabeledStatement)boundNode);
case BoundKind.ExpressionStatement:
return (IOperation?)(object)CreateBoundExpressionStatementOperation((BoundExpressionStatement)boundNode);
case BoundKind.TupleLiteral:
case BoundKind.ConvertedTupleLiteral:
return CreateBoundTupleOperation((BoundTupleExpression)boundNode);
case BoundKind.InterpolatedString:
return (IOperation?)(object)CreateBoundInterpolatedStringExpressionOperation((BoundInterpolatedString)boundNode);
case BoundKind.StringInsert:
return (IOperation?)(object)CreateBoundInterpolationOperation((BoundStringInsert)boundNode);
case BoundKind.LocalFunctionStatement:
return (IOperation?)(object)CreateBoundLocalFunctionStatementOperation((BoundLocalFunctionStatement)boundNode);
case BoundKind.AnonymousObjectCreationExpression:
return (IOperation?)(object)CreateBoundAnonymousObjectCreationExpressionOperation((BoundAnonymousObjectCreationExpression)boundNode);
case BoundKind.ConstantPattern:
return (IOperation?)(object)CreateBoundConstantPatternOperation((BoundConstantPattern)boundNode);
case BoundKind.DeclarationPattern:
return (IOperation?)(object)CreateBoundDeclarationPatternOperation((BoundDeclarationPattern)boundNode);
case BoundKind.RecursivePattern:
return (IOperation?)(object)CreateBoundRecursivePatternOperation((BoundRecursivePattern)boundNode);
case BoundKind.ITuplePattern:
return (IOperation?)(object)CreateBoundRecursivePatternOperation((BoundITuplePattern)boundNode);
case BoundKind.DiscardPattern:
return CreateBoundDiscardPatternOperation((BoundDiscardPattern)boundNode);
case BoundKind.BinaryPattern:
return CreateBoundBinaryPatternOperation((BoundBinaryPattern)boundNode);
case BoundKind.NegatedPattern:
return CreateBoundNegatedPatternOperation((BoundNegatedPattern)boundNode);
case BoundKind.RelationalPattern:
return CreateBoundRelationalPatternOperation((BoundRelationalPattern)boundNode);
case BoundKind.TypePattern:
return CreateBoundTypePatternOperation((BoundTypePattern)boundNode);
case BoundKind.SlicePattern:
return CreateBoundSlicePatternOperation((BoundSlicePattern)boundNode);
case BoundKind.ListPattern:
return CreateBoundListPatternOperation((BoundListPattern)boundNode);
case BoundKind.SwitchStatement:
return (IOperation?)(object)CreateBoundSwitchStatementOperation((BoundSwitchStatement)boundNode);
case BoundKind.SwitchLabel:
return (IOperation?)(object)CreateBoundSwitchLabelOperation((BoundSwitchLabel)boundNode);
case BoundKind.IsPatternExpression:
return (IOperation?)(object)CreateBoundIsPatternExpressionOperation((BoundIsPatternExpression)boundNode);
case BoundKind.QueryClause:
return CreateBoundQueryClauseOperation((BoundQueryClause)boundNode);
case BoundKind.DelegateCreationExpression:
return (IOperation?)(object)CreateBoundDelegateCreationExpressionOperation((BoundDelegateCreationExpression)boundNode);
case BoundKind.RangeVariable:
return CreateBoundRangeVariableOperation((BoundRangeVariable)boundNode);
case BoundKind.ConstructorMethodBody:
return (IOperation?)(object)CreateConstructorBodyOperation((BoundConstructorMethodBody)boundNode);
case BoundKind.NonConstructorMethodBody:
return (IOperation?)(object)CreateMethodBodyOperation((BoundNonConstructorMethodBody)boundNode);
case BoundKind.DiscardExpression:
return CreateBoundDiscardExpressionOperation((BoundDiscardExpression)boundNode);
case BoundKind.NullCoalescingAssignmentOperator:
return CreateBoundNullCoalescingAssignmentOperatorOperation((BoundNullCoalescingAssignmentOperator)boundNode);
case BoundKind.FromEndIndexExpression:
return CreateFromEndIndexExpressionOperation((BoundFromEndIndexExpression)boundNode);
case BoundKind.RangeExpression:
return CreateRangeExpressionOperation((BoundRangeExpression)boundNode);
case BoundKind.SwitchSection:
return (IOperation?)(object)CreateBoundSwitchSectionOperation((BoundSwitchSection)boundNode);
case BoundKind.ConvertedSwitchExpression:
return (IOperation?)(object)CreateBoundSwitchExpressionOperation((BoundConvertedSwitchExpression)boundNode);
case BoundKind.SwitchExpressionArm:
return (IOperation?)(object)CreateBoundSwitchExpressionArmOperation((BoundSwitchExpressionArm)boundNode);
case BoundKind.ObjectOrCollectionValuePlaceholder:
return (IOperation?)(object)CreateCollectionValuePlaceholderOperation((BoundObjectOrCollectionValuePlaceholder)boundNode);
case BoundKind.FunctionPointerInvocation:
return CreateBoundFunctionPointerInvocationOperation((BoundFunctionPointerInvocation)boundNode);
case BoundKind.UnconvertedAddressOfOperator:
return CreateBoundUnconvertedAddressOfOperatorOperation((BoundUnconvertedAddressOfOperator)boundNode);
case BoundKind.InterpolatedStringArgumentPlaceholder:
return CreateBoundInterpolatedStringArgumentPlaceholder((BoundInterpolatedStringArgumentPlaceholder)boundNode);
case BoundKind.InterpolatedStringHandlerPlaceholder:
return CreateBoundInterpolatedStringHandlerPlaceholder((BoundInterpolatedStringHandlerPlaceholder)boundNode);
case BoundKind.Attribute:
return CreateBoundAttributeOperation((BoundAttribute)boundNode);
case BoundKind.GlobalStatementInitializer:
case BoundKind.TypeExpression:
case BoundKind.TypeOrValueExpression:
case BoundKind.NamespaceExpression:
case BoundKind.PointerIndirectionOperator:
case BoundKind.PointerElementAccess:
case BoundKind.RefTypeOperator:
case BoundKind.MakeRefOperator:
case BoundKind.RefValueOperator:
case BoundKind.ArgList:
case BoundKind.ArgListOperator:
case BoundKind.FixedLocalCollectionInitializer:
case BoundKind.PreviousSubmissionReference:
case BoundKind.HostObjectMemberReference:
case BoundKind.Sequence:
case BoundKind.MethodGroup:
case BoundKind.UnconvertedCollectionExpression:
case BoundKind.StackAllocArrayCreation:
case BoundKind.ConvertedStackAllocExpression:
{
ConstantValue val = (boundNode as BoundExpression)?.ConstantValueOpt;
bool flag = boundNode.WasCompilerGenerated;
if (!flag && boundNode.Kind == BoundKind.FixedLocalCollectionInitializer)
{
flag = true;
}
ImmutableArray<IOperation> iOperationChildren = GetIOperationChildren(boundNode);
ITypeSymbol val2 = ((!(boundNode is BoundExpression boundExpression)) ? null : boundExpression.GetPublicTypeSymbol());
ITypeSymbol val3 = val2;
return (IOperation?)new NoneOperation(iOperationChildren, _semanticModel, boundNode.Syntax, val3, val, flag);
}
default:
throw ExceptionUtilities.UnexpectedValue((object)boundNode.Kind);
}
}
public ImmutableArray<TOperation> CreateFromArray<TBoundNode, TOperation>(ImmutableArray<TBoundNode> boundNodes) where TBoundNode : BoundNode where TOperation : class, IOperation
{
if (boundNodes.IsDefault)
{
return ImmutableArray<TOperation>.Empty;
}
ArrayBuilder<TOperation> instance = ArrayBuilder<TOperation>.GetInstance(boundNodes.Length);
ImmutableArray<TBoundNode>.Enumerator enumerator = boundNodes.GetEnumerator();
while (enumerator.MoveNext())
{
TBoundNode current = enumerator.Current;
ArrayBuilderExtensions.AddIfNotNull<TOperation>(instance, (TOperation)(object)Create(current));
}
return instance.ToImmutableAndFree();
}
private IMethodBodyOperation CreateMethodBodyOperation(BoundNonConstructorMethodBody boundNode)
{
//IL_000c: 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_0039: Expected O, but got Unknown
//IL_0039: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
return (IMethodBodyOperation)new MethodBodyOperation((IBlockOperation)Create(boundNode.BlockBody), (IBlockOperation)Create(boundNode.ExpressionBody), _semanticModel, boundNode.Syntax, boundNode.WasCompilerGenerated);
}
private IConstructorBodyOperation CreateConstructorBodyOperation(BoundConstructorMethodBody boundNode)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0050: Expected O, but got Unknown
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
return (IConstructorBodyOperation)new ConstructorBodyOperation(boundNode.Locals.GetPublicSymbols(), Create(boundNode.Initializer), (IBlockOperation)Create(boundNode.BlockBody), (IBlockOperation)Create(boundNode.ExpressionBody), _semanticModel, boundNode.Syntax, boundNode.WasCompilerGenerated);
}
internal ImmutableArray<IOperation> GetIOperationChildren(IBoundNodeWithIOperationChildren boundNodeWithChildren)
{
ImmutableArray<BoundNode> children = boundNodeWithChildren.Children;
if (children.IsDefaultOrEmpty)
{
return ImmutableArray<IOperation>.Empty;
}
ArrayBuilder<IOperation> instance = ArrayBuilder<IOperation>.GetInstance(children.Length);
ImmutableArray<BoundNode>.Enumerator enumerator = children.GetEnumerator();
while (enumerator.MoveNext())
{
BoundNode current = enumerator.Current;
if (current != null)
{
IOperation val = Create(current);
instance.Add(val);
}
}
return instance.ToImmutableAndFree();
}
internal ImmutableArray<IVariableDeclaratorOperation> CreateVariableDeclarator(BoundNode declaration, SyntaxNode declarationSyntax)
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
switch (declaration.Kind)
{
case BoundKind.LocalDeclaration:
return ImmutableArray.Create<IVariableDeclaratorOperation>(CreateVariableDeclaratorInternal((BoundLocalDeclaration)declaration, (SyntaxNode)(((object)(declarationSyntax as VariableDeclarationSyntax)?.Variables[0]) ?? ((object)declarationSyntax))));
case BoundKind.MultipleLocalDeclarations:
case BoundKind.UsingLocalDeclarations:
{
BoundMultipleLocalDeclarationsBase obj = (BoundMultipleLocalDeclarationsBase)declaration;
ArrayBuilder<IVariableDeclaratorOperation> instance = ArrayBuilder<IVariableDeclaratorOperation>.GetInstance(obj.LocalDeclarations.Length);
ImmutableArray<BoundLocalDeclaration>.Enumerator enumerator = obj.LocalDeclarations.GetEnumerator();
while (enumerator.MoveNext())
{
BoundLocalDeclaration current = enumerator.Current;
instance.Add(CreateVariableDeclaratorInternal(current, current.Syntax));
}
return instance.ToImmutableAndFree();
}
default:
throw ExceptionUtilities.UnexpectedValue((object)declaration.Kind);
}
}
private IPlaceholderOperation CreateBoundDeconstructValuePlaceholderOperation(BoundDeconstructValuePlaceholder boundDeconstructValuePlaceholder)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = boundDeconstructValuePlaceholder.Syntax;
ITypeSymbol publicTypeSymbol = boundDeconstructValuePlaceholder.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDeconstructValuePlaceholder.WasCompilerGenerated;
return (IPlaceholderOperation)new PlaceholderOperation((PlaceholderKind)0, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IDeconstructionAssignmentOperation CreateBoundDeconstructionAssignmentOperator(BoundDeconstructionAssignmentOperator boundDeconstructionAssignmentOperator)
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
IOperation? obj = Create(boundDeconstructionAssignmentOperator.Left);
IOperation val = Create(boundDeconstructionAssignmentOperator.Right.Operand);
SyntaxNode syntax = boundDeconstructionAssignmentOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundDeconstructionAssignmentOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDeconstructionAssignmentOperator.WasCompilerGenerated;
return (IDeconstructionAssignmentOperation)new DeconstructionAssignmentOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundCallOperation(BoundCall boundCall)
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Expected O, but got Unknown
MethodSymbol method = boundCall.Method;
SyntaxNode syntax = boundCall.Syntax;
ITypeSymbol publicTypeSymbol = boundCall.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundCall.ConstantValueOpt;
bool wasCompilerGenerated = boundCall.WasCompilerGenerated;
if (boundCall.OriginalMethodsOpt.IsDefault && !IsMethodInvalid(boundCall.ResultKind, method))
{
TypeParameterSymbol constrainedToType = GetConstrainedToType(method, boundCall.ReceiverOpt);
bool flag = (object)constrainedToType != null || IsCallVirtual(method, boundCall.ReceiverOpt);
IOperation val = CreateReceiverOperation(boundCall.ReceiverOpt, method);
ImmutableArray<IArgumentOperation> immutableArray = DeriveArguments(boundCall);
return (IOperation)new InvocationOperation(method.GetPublicSymbol(), (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), val, flag, immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundCall).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private static TypeParameterSymbol? GetConstrainedToType(Symbol targetMember, BoundExpression? receiverOpt)
{
if (targetMember.IsStatic && (targetMember.IsAbstract || targetMember.IsVirtual) && receiverOpt is BoundTypeExpression { Type: TypeParameterSymbol type })
{
return type;
}
return null;
}
private IOperation CreateBoundFunctionPointerInvocationOperation(BoundFunctionPointerInvocation boundFunctionPointerInvocation)
{
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
ITypeSymbol publicTypeSymbol = boundFunctionPointerInvocation.GetPublicTypeSymbol();
SyntaxNode syntax = boundFunctionPointerInvocation.Syntax;
bool wasCompilerGenerated = boundFunctionPointerInvocation.WasCompilerGenerated;
if (boundFunctionPointerInvocation.ResultKind == LookupResultKind.Viable)
{
IOperation? obj = Create(boundFunctionPointerInvocation.InvokedExpression);
ImmutableArray<IArgumentOperation> immutableArray = DeriveArguments(boundFunctionPointerInvocation);
return (IOperation)new FunctionPointerInvocationOperation(obj, immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundFunctionPointerInvocation).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
private IOperation CreateBoundUnconvertedAddressOfOperatorOperation(BoundUnconvertedAddressOfOperator boundUnconvertedAddressOf)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
return (IOperation)new AddressOfOperation(Create(boundUnconvertedAddressOf.Operand), _semanticModel, boundUnconvertedAddressOf.Syntax, boundUnconvertedAddressOf.GetPublicTypeSymbol(), boundUnconvertedAddressOf.WasCompilerGenerated);
}
private IOperation CreateBoundAttributeOperation(BoundAttribute boundAttribute)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Expected O, but got Unknown
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
bool wasCompilerGenerated = boundAttribute.WasCompilerGenerated;
if ((object)boundAttribute.Constructor != null)
{
ObjectOrCollectionInitializerOperation val = null;
if (!boundAttribute.NamedArguments.IsEmpty)
{
val = new ObjectOrCollectionInitializerOperation(this.CreateFromArray<BoundAssignmentOperator, IOperation>(boundAttribute.NamedArguments), _semanticModel, boundAttribute.Syntax, boundAttribute.GetPublicTypeSymbol(), true);
}
return (IOperation)new AttributeOperation((IOperation)new ObjectCreationOperation(boundAttribute.Constructor.GetPublicSymbol(), (IObjectOrCollectionInitializerOperation)(object)val, DeriveArguments(boundAttribute), _semanticModel, boundAttribute.Syntax, boundAttribute.GetPublicTypeSymbol(), boundAttribute.ConstantValueOpt, true), _semanticModel, boundAttribute.Syntax, wasCompilerGenerated);
}
return (IOperation)new AttributeOperation((IOperation)(object)OperationFactory.CreateInvalidOperation(_semanticModel, boundAttribute.Syntax, GetIOperationChildren(boundAttribute), true), _semanticModel, boundAttribute.Syntax, wasCompilerGenerated);
}
internal ImmutableArray<IOperation> CreateIgnoredDimensions(BoundNode declaration)
{
switch (declaration.Kind)
{
case BoundKind.LocalDeclaration:
{
BoundTypeExpression declaredTypeOpt = ((BoundLocalDeclaration)declaration).DeclaredTypeOpt;
return this.CreateFromArray<BoundExpression, IOperation>(declaredTypeOpt.BoundDimensionsOpt);
}
case BoundKind.MultipleLocalDeclarations:
case BoundKind.UsingLocalDeclarations:
{
ImmutableArray<BoundLocalDeclaration> localDeclarations = ((BoundMultipleLocalDeclarationsBase)declaration).LocalDeclarations;
ImmutableArray<BoundExpression> boundNodes = ((localDeclarations.Length <= 0) ? ImmutableArray<BoundExpression>.Empty : localDeclarations[0].DeclaredTypeOpt.BoundDimensionsOpt);
return this.CreateFromArray<BoundExpression, IOperation>(boundNodes);
}
default:
throw ExceptionUtilities.UnexpectedValue((object)declaration.Kind);
}
}
internal IOperation CreateBoundLocalOperation(BoundLocal boundLocal, bool createDeclaration = true)
{
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
ILocalSymbol publicSymbol = boundLocal.LocalSymbol.GetPublicSymbol();
bool flag = boundLocal.DeclarationKind != BoundLocalDeclarationKind.None;
SyntaxNode val = boundLocal.Syntax;
ITypeSymbol publicTypeSymbol = boundLocal.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundLocal.ConstantValueOpt;
bool wasCompilerGenerated = boundLocal.WasCompilerGenerated;
if (flag && val is DeclarationExpressionSyntax declarationExpressionSyntax)
{
val = (SyntaxNode)(object)declarationExpressionSyntax.Designation;
if (createDeclaration)
{
return (IOperation)new DeclarationExpressionOperation(CreateBoundLocalOperation(boundLocal, createDeclaration: false), _semanticModel, (SyntaxNode)(object)declarationExpressionSyntax, publicTypeSymbol, false);
}
}
return (IOperation)new LocalReferenceOperation(publicSymbol, flag, _semanticModel, val, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
internal IOperation CreateBoundFieldAccessOperation(BoundFieldAccess boundFieldAccess, bool createDeclaration = true)
{
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Expected O, but got Unknown
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Expected O, but got Unknown
IFieldSymbol publicSymbol = boundFieldAccess.FieldSymbol.GetPublicSymbol();
bool isDeclaration = boundFieldAccess.IsDeclaration;
SyntaxNode val = boundFieldAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundFieldAccess.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundFieldAccess.ConstantValueOpt;
bool wasCompilerGenerated = boundFieldAccess.WasCompilerGenerated;
if (isDeclaration && val is DeclarationExpressionSyntax declarationExpressionSyntax)
{
val = (SyntaxNode)(object)declarationExpressionSyntax.Designation;
if (createDeclaration)
{
return (IOperation)new DeclarationExpressionOperation(CreateBoundFieldAccessOperation(boundFieldAccess, createDeclaration: false), _semanticModel, (SyntaxNode)(object)declarationExpressionSyntax, publicTypeSymbol, false);
}
}
IOperation val2 = CreateReceiverOperation(boundFieldAccess.ReceiverOpt, boundFieldAccess.FieldSymbol);
return (IOperation)new FieldReferenceOperation(publicSymbol, isDeclaration, val2, _semanticModel, val, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
internal IOperation? CreateBoundPropertyReferenceInstance(BoundNode boundNode)
{
if (!(boundNode is BoundPropertyAccess boundPropertyAccess))
{
if (!(boundNode is BoundObjectInitializerMember boundObjectInitializerMember))
{
if (boundNode is BoundIndexerAccess boundIndexerAccess)
{
return CreateReceiverOperation(boundIndexerAccess.ReceiverOpt, boundIndexerAccess.ExpressionSymbol);
}
throw ExceptionUtilities.UnexpectedValue((object)boundNode.Kind);
}
Symbol? memberSymbol = boundObjectInitializerMember.MemberSymbol;
if ((object)memberSymbol == null || !memberSymbol.IsStatic)
{
return (IOperation?)(object)CreateImplicitReceiver(boundObjectInitializerMember.Syntax, boundObjectInitializerMember.ReceiverType);
}
return null;
}
return CreateReceiverOperation(boundPropertyAccess.ReceiverOpt, boundPropertyAccess.PropertySymbol);
}
private IPropertyReferenceOperation CreateBoundPropertyAccessOperation(BoundPropertyAccess boundPropertyAccess)
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
IOperation val = CreateReceiverOperation(boundPropertyAccess.ReceiverOpt, boundPropertyAccess.PropertySymbol);
ImmutableArray<IArgumentOperation> empty = ImmutableArray<IArgumentOperation>.Empty;
IPropertySymbol? publicSymbol = boundPropertyAccess.PropertySymbol.GetPublicSymbol();
SyntaxNode syntax = boundPropertyAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundPropertyAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundPropertyAccess.WasCompilerGenerated;
TypeParameterSymbol constrainedToType = GetConstrainedToType(boundPropertyAccess.PropertySymbol, boundPropertyAccess.ReceiverOpt);
return (IPropertyReferenceOperation)new PropertyReferenceOperation(publicSymbol, (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), empty, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundIndexerAccessOperation(BoundIndexerAccess boundIndexerAccess)
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
PropertySymbol indexer = boundIndexerAccess.Indexer;
SyntaxNode syntax = boundIndexerAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundIndexerAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundIndexerAccess.WasCompilerGenerated;
if (boundIndexerAccess.OriginalIndexersOpt.IsDefault && boundIndexerAccess.ResultKind != LookupResultKind.OverloadResolutionFailure)
{
ImmutableArray<IArgumentOperation> immutableArray = DeriveArguments(boundIndexerAccess);
IOperation val = CreateReceiverOperation(boundIndexerAccess.ReceiverOpt, boundIndexerAccess.ExpressionSymbol);
TypeParameterSymbol constrainedToType = GetConstrainedToType(indexer, boundIndexerAccess.ReceiverOpt);
return (IOperation)new PropertyReferenceOperation(indexer.GetPublicSymbol(), (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), immutableArray, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundIndexerAccess).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
private IEventReferenceOperation CreateBoundEventAccessOperation(BoundEventAccess boundEventAccess)
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
IEventSymbol? publicSymbol = boundEventAccess.EventSymbol.GetPublicSymbol();
IOperation val = CreateReceiverOperation(boundEventAccess.ReceiverOpt, boundEventAccess.EventSymbol);
SyntaxNode syntax = boundEventAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundEventAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundEventAccess.WasCompilerGenerated;
TypeParameterSymbol constrainedToType = GetConstrainedToType(boundEventAccess.EventSymbol, boundEventAccess.ReceiverOpt);
return (IEventReferenceOperation)new EventReferenceOperation(publicSymbol, (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IEventAssignmentOperation CreateBoundEventAssignmentOperatorOperation(BoundEventAssignmentOperator boundEventAssignmentOperator)
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
IEventReferenceOperation obj = CreateBoundEventAccessOperation(boundEventAssignmentOperator);
IOperation val = Create(boundEventAssignmentOperator.Argument);
SyntaxNode syntax = boundEventAssignmentOperator.Syntax;
bool isAddition = boundEventAssignmentOperator.IsAddition;
ITypeSymbol publicTypeSymbol = boundEventAssignmentOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundEventAssignmentOperator.WasCompilerGenerated;
return (IEventAssignmentOperation)new EventAssignmentOperation((IOperation)(object)obj, val, isAddition, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IParameterReferenceOperation CreateBoundParameterOperation(BoundParameter boundParameter)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Expected O, but got Unknown
IParameterSymbol? publicSymbol = boundParameter.ParameterSymbol.GetPublicSymbol();
SyntaxNode syntax = boundParameter.Syntax;
ITypeSymbol publicTypeSymbol = boundParameter.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundParameter.WasCompilerGenerated;
return (IParameterReferenceOperation)new ParameterReferenceOperation(publicSymbol, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
internal ILiteralOperation CreateBoundLiteralOperation(BoundLiteral boundLiteral, bool @implicit = false)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
SyntaxNode syntax = boundLiteral.Syntax;
ITypeSymbol publicTypeSymbol = boundLiteral.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundLiteral.ConstantValueOpt;
bool flag = boundLiteral.WasCompilerGenerated || @implicit;
return (ILiteralOperation)new LiteralOperation(_semanticModel, syntax, publicTypeSymbol, constantValueOpt, flag);
}
private IUtf8StringOperation CreateBoundUtf8StringOperation(BoundUtf8String boundNode)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
SyntaxNode syntax = boundNode.Syntax;
ITypeSymbol publicTypeSymbol = boundNode.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundNode.WasCompilerGenerated;
return (IUtf8StringOperation)new Utf8StringOperation(boundNode.Value, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IAnonymousObjectCreationOperation CreateBoundAnonymousObjectCreationExpressionOperation(BoundAnonymousObjectCreationExpression boundAnonymousObjectCreationExpression)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
SyntaxNode syntax = boundAnonymousObjectCreationExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundAnonymousObjectCreationExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundAnonymousObjectCreationExpression.WasCompilerGenerated;
return (IAnonymousObjectCreationOperation)new AnonymousObjectCreationOperation(GetAnonymousObjectCreationInitializers(boundAnonymousObjectCreationExpression.Arguments, boundAnonymousObjectCreationExpression.Declarations, syntax, publicTypeSymbol, wasCompilerGenerated), _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundObjectCreationExpressionOperation(BoundObjectCreationExpression boundObjectCreationExpression)
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Expected O, but got Unknown
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
MethodSymbol constructor = boundObjectCreationExpression.Constructor;
SyntaxNode syntax = boundObjectCreationExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundObjectCreationExpression.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundObjectCreationExpression.ConstantValueOpt;
bool wasCompilerGenerated = boundObjectCreationExpression.WasCompilerGenerated;
if (boundObjectCreationExpression.ResultKind != LookupResultKind.OverloadResolutionFailure && !(constructor.OriginalDefinition is ErrorMethodSymbol))
{
if (!boundObjectCreationExpression.Type.IsAnonymousType)
{
ImmutableArray<IArgumentOperation> immutableArray = DeriveArguments(boundObjectCreationExpression);
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(boundObjectCreationExpression.InitializerExpressionOpt);
return (IOperation)new ObjectCreationOperation(constructor.GetPublicSymbol(), val, immutableArray, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
return (IOperation)new AnonymousObjectCreationOperation(GetAnonymousObjectCreationInitializers(boundObjectCreationExpression.Arguments, ImmutableArray<BoundAnonymousPropertyDeclaration>.Empty, syntax, publicTypeSymbol, wasCompilerGenerated), _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundObjectCreationExpression).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IOperation CreateBoundWithExpressionOperation(BoundWithExpression boundWithExpression)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected O, but got Unknown
IOperation? obj = Create(boundWithExpression.Receiver);
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(boundWithExpression.InitializerExpression);
MethodSymbol cloneMethod = boundWithExpression.CloneMethod;
SyntaxNode syntax = boundWithExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundWithExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundWithExpression.WasCompilerGenerated;
return (IOperation)new WithOperation(obj, cloneMethod.GetPublicSymbol(), val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IDynamicObjectCreationOperation CreateBoundDynamicObjectCreationExpressionOperation(BoundDynamicObjectCreationExpression boundDynamicObjectCreationExpression)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Expected O, but got Unknown
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(boundDynamicObjectCreationExpression.InitializerExpressionOpt);
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundDynamicObjectCreationExpression.Arguments);
ImmutableArray<string> immutableArray2 = ImmutableArrayExtensions.NullToEmpty<string>(boundDynamicObjectCreationExpression.ArgumentNamesOpt);
ImmutableArray<RefKind> immutableArray3 = ImmutableArrayExtensions.NullToEmpty<RefKind>(boundDynamicObjectCreationExpression.ArgumentRefKindsOpt);
SyntaxNode syntax = boundDynamicObjectCreationExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundDynamicObjectCreationExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDynamicObjectCreationExpression.WasCompilerGenerated;
return (IDynamicObjectCreationOperation)new DynamicObjectCreationOperation(val, immutableArray, immutableArray2, immutableArray3, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
internal IOperation CreateBoundDynamicInvocationExpressionReceiver(BoundNode receiver)
{
if (!(receiver is BoundObjectOrCollectionValuePlaceholder boundObjectOrCollectionValuePlaceholder))
{
if (receiver is BoundMethodGroup boundMethodGroup)
{
return (IOperation)(object)CreateBoundDynamicMemberAccessOperation(boundMethodGroup.ReceiverOpt, TypeMap.AsTypeSymbols(boundMethodGroup.TypeArgumentsOpt), boundMethodGroup.Name, boundMethodGroup.Syntax, boundMethodGroup.GetPublicTypeSymbol(), boundMethodGroup.WasCompilerGenerated);
}
return Create(receiver);
}
return (IOperation)(object)CreateBoundDynamicMemberAccessOperation(boundObjectOrCollectionValuePlaceholder, ImmutableArray<TypeSymbol>.Empty, "Add", boundObjectOrCollectionValuePlaceholder.Syntax, null, isImplicit: true);
}
private IDynamicInvocationOperation CreateBoundDynamicInvocationExpressionOperation(BoundDynamicInvocation boundDynamicInvocation)
{
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
IOperation obj = CreateBoundDynamicInvocationExpressionReceiver(boundDynamicInvocation.Expression);
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundDynamicInvocation.Arguments);
ImmutableArray<string> immutableArray2 = ImmutableArrayExtensions.NullToEmpty<string>(boundDynamicInvocation.ArgumentNamesOpt);
ImmutableArray<RefKind> immutableArray3 = ImmutableArrayExtensions.NullToEmpty<RefKind>(boundDynamicInvocation.ArgumentRefKindsOpt);
SyntaxNode syntax = boundDynamicInvocation.Syntax;
ITypeSymbol publicTypeSymbol = boundDynamicInvocation.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDynamicInvocation.WasCompilerGenerated;
return (IDynamicInvocationOperation)new DynamicInvocationOperation(obj, immutableArray, immutableArray2, immutableArray3, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
internal IOperation CreateBoundDynamicIndexerAccessExpressionReceiver(BoundExpression indexer)
{
if (!(indexer is BoundDynamicIndexerAccess boundDynamicIndexerAccess))
{
if (indexer is BoundObjectInitializerMember boundObjectInitializerMember)
{
return (IOperation)(object)CreateImplicitReceiver(boundObjectInitializerMember.Syntax, boundObjectInitializerMember.ReceiverType);
}
throw ExceptionUtilities.UnexpectedValue((object)indexer.Kind);
}
return Create(boundDynamicIndexerAccess.Receiver);
}
internal ImmutableArray<IOperation> CreateBoundDynamicIndexerAccessArguments(BoundExpression indexer)
{
if (!(indexer is BoundDynamicIndexerAccess boundDynamicIndexerAccess))
{
if (indexer is BoundObjectInitializerMember boundObjectInitializerMember)
{
return this.CreateFromArray<BoundExpression, IOperation>(boundObjectInitializerMember.Arguments);
}
throw ExceptionUtilities.UnexpectedValue((object)indexer.Kind);
}
return this.CreateFromArray<BoundExpression, IOperation>(boundDynamicIndexerAccess.Arguments);
}
private IDynamicIndexerAccessOperation CreateBoundDynamicIndexerAccessExpressionOperation(BoundDynamicIndexerAccess boundDynamicIndexerAccess)
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected O, but got Unknown
IOperation obj = CreateBoundDynamicIndexerAccessExpressionReceiver(boundDynamicIndexerAccess);
ImmutableArray<IOperation> immutableArray = CreateBoundDynamicIndexerAccessArguments(boundDynamicIndexerAccess);
ImmutableArray<string> immutableArray2 = ImmutableArrayExtensions.NullToEmpty<string>(boundDynamicIndexerAccess.ArgumentNamesOpt);
ImmutableArray<RefKind> immutableArray3 = ImmutableArrayExtensions.NullToEmpty<RefKind>(boundDynamicIndexerAccess.ArgumentRefKindsOpt);
SyntaxNode syntax = boundDynamicIndexerAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundDynamicIndexerAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDynamicIndexerAccess.WasCompilerGenerated;
return (IDynamicIndexerAccessOperation)new DynamicIndexerAccessOperation(obj, immutableArray, immutableArray2, immutableArray3, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IObjectOrCollectionInitializerOperation CreateBoundObjectInitializerExpressionOperation(BoundObjectInitializerExpression boundObjectInitializerExpression)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundObjectInitializerExpression));
SyntaxNode syntax = boundObjectInitializerExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundObjectInitializerExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundObjectInitializerExpression.WasCompilerGenerated;
return (IObjectOrCollectionInitializerOperation)new ObjectOrCollectionInitializerOperation(immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IObjectOrCollectionInitializerOperation CreateBoundCollectionInitializerExpressionOperation(BoundCollectionInitializerExpression boundCollectionInitializerExpression)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundCollectionInitializerExpression));
SyntaxNode syntax = boundCollectionInitializerExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundCollectionInitializerExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundCollectionInitializerExpression.WasCompilerGenerated;
return (IObjectOrCollectionInitializerOperation)new ObjectOrCollectionInitializerOperation(immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundObjectInitializerMemberOperation(BoundObjectInitializerMember boundObjectInitializerMember, bool isObjectOrCollectionInitializer = false)
{
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Invalid comparison between Unknown and I4
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Expected O, but got Unknown
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Invalid comparison between Unknown and I4
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Expected O, but got Unknown
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Invalid comparison between Unknown and I4
//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Expected O, but got Unknown
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0198: Expected O, but got Unknown
Symbol memberSymbol = boundObjectInitializerMember.MemberSymbol;
SyntaxNode syntax = boundObjectInitializerMember.Syntax;
ITypeSymbol publicTypeSymbol = boundObjectInitializerMember.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundObjectInitializerMember.WasCompilerGenerated;
if ((object)memberSymbol == null)
{
IOperation obj = CreateBoundDynamicIndexerAccessExpressionReceiver(boundObjectInitializerMember);
ImmutableArray<IOperation> immutableArray = CreateBoundDynamicIndexerAccessArguments(boundObjectInitializerMember);
ImmutableArray<string> immutableArray2 = ImmutableArrayExtensions.NullToEmpty<string>(boundObjectInitializerMember.ArgumentNamesOpt);
ImmutableArray<RefKind> immutableArray3 = ImmutableArrayExtensions.NullToEmpty<RefKind>(boundObjectInitializerMember.ArgumentRefKindsOpt);
return (IOperation)new DynamicIndexerAccessOperation(obj, immutableArray, immutableArray2, immutableArray3, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
SymbolKind kind = memberSymbol.Kind;
if ((int)kind != 5)
{
if ((int)kind != 6)
{
if ((int)kind == 15)
{
PropertySymbol propertySymbol = (PropertySymbol)memberSymbol;
ImmutableArray<IArgumentOperation> immutableArray4;
if (!boundObjectInitializerMember.Arguments.IsEmpty)
{
MethodSymbol methodSymbol = (isObjectOrCollectionInitializer ? propertySymbol.GetOwnOrInheritedGetMethod() : propertySymbol.GetOwnOrInheritedSetMethod());
if (methodSymbol == null || boundObjectInitializerMember.ResultKind == LookupResultKind.OverloadResolutionFailure || methodSymbol.OriginalDefinition is ErrorMethodSymbol)
{
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundObjectInitializerMember).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
immutableArray4 = DeriveArguments(boundObjectInitializerMember);
}
else
{
immutableArray4 = ImmutableArray<IArgumentOperation>.Empty;
}
return (IOperation)new PropertyReferenceOperation(propertySymbol.GetPublicSymbol(), (ITypeSymbol)null, immutableArray4, createReceiver(), _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
throw ExceptionUtilities.UnexpectedValue((object)memberSymbol.Kind);
}
FieldSymbol symbol = (FieldSymbol)memberSymbol;
bool flag = false;
return (IOperation)new FieldReferenceOperation(symbol.GetPublicSymbol(), flag, createReceiver(), _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
return (IOperation)new EventReferenceOperation(((EventSymbol)memberSymbol).GetPublicSymbol(), (ITypeSymbol)null, createReceiver(), _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
IOperation? createReceiver()
{
Symbol symbol2 = memberSymbol;
if ((object)symbol2 == null || !symbol2.IsStatic)
{
return (IOperation?)(object)CreateImplicitReceiver(boundObjectInitializerMember.Syntax, boundObjectInitializerMember.ReceiverType);
}
return null;
}
}
private IOperation CreateBoundDynamicObjectInitializerMemberOperation(BoundDynamicObjectInitializerMember boundDynamicObjectInitializerMember)
{
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
IInstanceReferenceOperation obj = CreateImplicitReceiver(boundDynamicObjectInitializerMember.Syntax, boundDynamicObjectInitializerMember.ReceiverType);
string memberName = boundDynamicObjectInitializerMember.MemberName;
ImmutableArray<ITypeSymbol> empty = ImmutableArray<ITypeSymbol>.Empty;
ITypeSymbol publicSymbol = boundDynamicObjectInitializerMember.ReceiverType.GetPublicSymbol();
SyntaxNode syntax = boundDynamicObjectInitializerMember.Syntax;
ITypeSymbol publicTypeSymbol = boundDynamicObjectInitializerMember.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDynamicObjectInitializerMember.WasCompilerGenerated;
return (IOperation)new DynamicMemberReferenceOperation((IOperation)(object)obj, memberName, empty, publicSymbol, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundCollectionElementInitializerOperation(BoundCollectionElementInitializer boundCollectionElementInitializer)
{
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Expected O, but got Unknown
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Expected O, but got Unknown
MethodSymbol addMethod = boundCollectionElementInitializer.AddMethod;
IOperation val = CreateReceiverOperation(boundCollectionElementInitializer.ImplicitReceiverOpt, addMethod);
ImmutableArray<IArgumentOperation> immutableArray = DeriveArguments(boundCollectionElementInitializer);
SyntaxNode syntax = boundCollectionElementInitializer.Syntax;
ITypeSymbol publicTypeSymbol = boundCollectionElementInitializer.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundCollectionElementInitializer.ConstantValueOpt;
bool wasCompilerGenerated = boundCollectionElementInitializer.WasCompilerGenerated;
if (!IsMethodInvalid(boundCollectionElementInitializer.ResultKind, addMethod))
{
bool flag = IsCallVirtual(addMethod, boundCollectionElementInitializer.ImplicitReceiverOpt);
return (IOperation)new InvocationOperation(addMethod.GetPublicSymbol(), (ITypeSymbol)null, val, flag, immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(((IBoundInvalidNode)boundCollectionElementInitializer).InvalidNodeChildren), _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IDynamicMemberReferenceOperation CreateBoundDynamicMemberAccessOperation(BoundDynamicMemberAccess boundDynamicMemberAccess)
{
return CreateBoundDynamicMemberAccessOperation(boundDynamicMemberAccess.Receiver, TypeMap.AsTypeSymbols(boundDynamicMemberAccess.TypeArgumentsOpt), boundDynamicMemberAccess.Name, boundDynamicMemberAccess.Syntax, boundDynamicMemberAccess.GetPublicTypeSymbol(), boundDynamicMemberAccess.WasCompilerGenerated);
}
private IDynamicMemberReferenceOperation CreateBoundDynamicMemberAccessOperation(BoundExpression? receiver, ImmutableArray<TypeSymbol> typeArgumentsOpt, string memberName, SyntaxNode syntaxNode, ITypeSymbol? type, bool isImplicit)
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Expected O, but got Unknown
ITypeSymbol val = null;
if (receiver != null && receiver.Kind == BoundKind.TypeExpression)
{
val = receiver.GetPublicTypeSymbol();
receiver = null;
}
ImmutableArray<ITypeSymbol> immutableArray = ImmutableArray<ITypeSymbol>.Empty;
if (!typeArgumentsOpt.IsDefault)
{
immutableArray = typeArgumentsOpt.GetPublicSymbols();
}
return (IDynamicMemberReferenceOperation)new DynamicMemberReferenceOperation(Create(receiver), memberName, immutableArray, val, _semanticModel, syntaxNode, type, isImplicit);
}
private IDynamicInvocationOperation CreateBoundDynamicCollectionElementInitializerOperation(BoundDynamicCollectionElementInitializer boundCollectionElementInitializer)
{
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
IOperation obj = CreateBoundDynamicInvocationExpressionReceiver(boundCollectionElementInitializer.Expression);
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundCollectionElementInitializer.Arguments);
SyntaxNode syntax = boundCollectionElementInitializer.Syntax;
ITypeSymbol publicTypeSymbol = boundCollectionElementInitializer.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundCollectionElementInitializer.WasCompilerGenerated;
return (IDynamicInvocationOperation)new DynamicInvocationOperation(obj, immutableArray, ImmutableArray<string>.Empty, ImmutableArray<RefKind>.Empty, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateUnboundLambdaOperation(UnboundLambda unboundLambda)
{
BoundLambda boundNode = unboundLambda.BindForErrorRecovery();
return Create(boundNode);
}
private IAnonymousFunctionOperation CreateBoundLambdaOperation(BoundLambda boundLambda)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
IMethodSymbol? publicSymbol = boundLambda.Symbol.GetPublicSymbol();
IBlockOperation val = (IBlockOperation)Create(boundLambda.Body);
SyntaxNode syntax = boundLambda.Syntax;
bool wasCompilerGenerated = boundLambda.WasCompilerGenerated;
return (IAnonymousFunctionOperation)new AnonymousFunctionOperation(publicSymbol, val, _semanticModel, syntax, wasCompilerGenerated);
}
private ILocalFunctionOperation CreateBoundLocalFunctionStatementOperation(BoundLocalFunctionStatement boundLocalFunctionStatement)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
IBlockOperation val = (IBlockOperation)Create(boundLocalFunctionStatement.Body);
object obj;
if (boundLocalFunctionStatement != null && boundLocalFunctionStatement.BlockBody != null)
{
BoundBlock expressionBody = boundLocalFunctionStatement.ExpressionBody;
if (expressionBody != null)
{
obj = (object)(IBlockOperation)Create(expressionBody);
goto IL_0036;
}
}
obj = null;
goto IL_0036;
IL_0036:
IBlockOperation val2 = (IBlockOperation)obj;
IMethodSymbol? publicSymbol = boundLocalFunctionStatement.Symbol.GetPublicSymbol();
SyntaxNode syntax = boundLocalFunctionStatement.Syntax;
bool wasCompilerGenerated = boundLocalFunctionStatement.WasCompilerGenerated;
return (ILocalFunctionOperation)new LocalFunctionOperation(publicSymbol, val, val2, _semanticModel, syntax, wasCompilerGenerated);
}
private IOperation CreateBoundConversionOperation(BoundConversion boundConversion, bool forceOperandImplicitLiteral = false)
{
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Expected O, but got Unknown
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_01e9: Expected O, but got Unknown
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_0267: Expected O, but got Unknown
bool flag = boundConversion.WasCompilerGenerated || !boundConversion.ExplicitCastInCode || forceOperandImplicitLiteral;
BoundExpression operand = boundConversion.Operand;
if (boundConversion.ConversionKind == ConversionKind.InterpolatedStringHandler)
{
return (IOperation)(object)CreateInterpolatedStringHandler(boundConversion);
}
if (boundConversion.ConversionKind == ConversionKind.MethodGroup)
{
SyntaxNode syntax = boundConversion.Syntax;
ITypeSymbol publicTypeSymbol = boundConversion.GetPublicTypeSymbol();
if (!(boundConversion.Type is FunctionPointerTypeSymbol))
{
IOperation val = CreateDelegateTargetOperation(boundConversion);
flag = flag || (val.Syntax == syntax && !val.IsImplicit);
return (IOperation)new DelegateCreationOperation(val, _semanticModel, syntax, publicTypeSymbol, flag);
}
return (IOperation)new AddressOfOperation((IOperation)(object)CreateBoundMethodGroupSingleMethodOperation((BoundMethodGroup)boundConversion.Operand, boundConversion.SymbolOpt, suppressVirtualCalls: false), _semanticModel, syntax, publicTypeSymbol, boundConversion.WasCompilerGenerated);
}
SyntaxNode syntax2 = boundConversion.Syntax;
if (syntax2.IsMissing)
{
return Create(operand);
}
BoundConversion boundConversion2 = boundConversion;
Conversion conversion = boundConversion.Conversion;
if (operand.Syntax == boundConversion.Syntax)
{
if (operand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(operand.Type, boundConversion.Type, (TypeCompareKind)0))
{
return Create(operand);
}
flag = true;
}
if (boundConversion.ExplicitCastInCode && conversion.IsIdentity && operand.Kind == BoundKind.Conversion)
{
BoundConversion boundConversion3 = (BoundConversion)operand;
BoundExpression operand2 = boundConversion3.Operand;
if (boundConversion3.Syntax == operand2.Syntax && boundConversion3.ExplicitCastInCode && operand2.Kind == BoundKind.ConvertedTupleLiteral && !TypeSymbol.Equals(boundConversion3.Type, operand2.Type, (TypeCompareKind)0))
{
conversion = boundConversion3.Conversion;
boundConversion2 = boundConversion3;
}
}
ITypeSymbol publicTypeSymbol2 = boundConversion.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundConversion.ConstantValueOpt;
if ((operand.Kind == BoundKind.Lambda || operand.Kind == BoundKind.UnboundLambda || operand.Kind == BoundKind.MethodGroup) && boundConversion.Type.IsDelegateType())
{
return (IOperation)new DelegateCreationOperation(CreateDelegateTargetOperation(boundConversion2), _semanticModel, syntax2, publicTypeSymbol2, flag);
}
bool flag2 = false;
bool flag3 = boundConversion.Checked && (conversion.IsNumeric || ((object)boundConversion.SymbolOpt != null && SyntaxFacts.IsCheckedOperator(boundConversion.SymbolOpt.Name)));
IOperation obj;
if (!forceOperandImplicitLiteral)
{
obj = Create(boundConversion2.Operand);
}
else
{
IOperation val2 = (IOperation)(object)CreateBoundLiteralOperation((BoundLiteral)boundConversion2.Operand, @implicit: true);
obj = val2;
}
return (IOperation)new ConversionOperation(obj, (IConvertibleConversion)(object)conversion, flag2, flag3, _semanticModel, syntax2, publicTypeSymbol2, constantValueOpt, flag);
}
private IConversionOperation CreateBoundAsOperatorOperation(BoundAsOperator boundAsOperator)
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
IOperation? obj = Create(boundAsOperator.Operand);
SyntaxNode syntax = boundAsOperator.Syntax;
Conversion conversion = BoundNode.GetConversion(boundAsOperator.OperandConversion, boundAsOperator.OperandPlaceholder);
bool flag = true;
bool flag2 = false;
ITypeSymbol publicTypeSymbol = boundAsOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundAsOperator.WasCompilerGenerated;
return (IConversionOperation)new ConversionOperation(obj, (IConvertibleConversion)(object)conversion, flag, flag2, _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
private IDelegateCreationOperation CreateBoundDelegateCreationExpressionOperation(BoundDelegateCreationExpression boundDelegateCreationExpression)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
IOperation obj = CreateDelegateTargetOperation(boundDelegateCreationExpression);
SyntaxNode syntax = boundDelegateCreationExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundDelegateCreationExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundDelegateCreationExpression.WasCompilerGenerated;
return (IDelegateCreationOperation)new DelegateCreationOperation(obj, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IMethodReferenceOperation CreateBoundMethodGroupSingleMethodOperation(BoundMethodGroup boundMethodGroup, MethodSymbol methodSymbol, bool suppressVirtualCalls)
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
TypeParameterSymbol constrainedToType = GetConstrainedToType(methodSymbol, boundMethodGroup.ReceiverOpt);
bool flag = (object)constrainedToType != null || ((methodSymbol.IsAbstract || methodSymbol.IsOverride || methodSymbol.IsVirtual) && !suppressVirtualCalls);
IOperation val = CreateReceiverOperation(boundMethodGroup.ReceiverOpt, methodSymbol);
SyntaxNode syntax = boundMethodGroup.Syntax;
ITypeSymbol val2 = null;
bool wasCompilerGenerated = boundMethodGroup.WasCompilerGenerated;
return (IMethodReferenceOperation)new MethodReferenceOperation(methodSymbol.GetPublicSymbol(), (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), flag, val, _semanticModel, syntax, val2, wasCompilerGenerated);
}
private IIsTypeOperation CreateBoundIsOperatorOperation(BoundIsOperator boundIsOperator)
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Expected O, but got Unknown
IOperation? obj = Create(boundIsOperator.Operand);
ITypeSymbol publicTypeSymbol = boundIsOperator.TargetType.GetPublicTypeSymbol();
SyntaxNode syntax = boundIsOperator.Syntax;
ITypeSymbol publicTypeSymbol2 = boundIsOperator.GetPublicTypeSymbol();
bool flag = false;
bool wasCompilerGenerated = boundIsOperator.WasCompilerGenerated;
return (IIsTypeOperation)new IsTypeOperation(obj, publicTypeSymbol, flag, _semanticModel, syntax, publicTypeSymbol2, wasCompilerGenerated);
}
private ISizeOfOperation CreateBoundSizeOfOperatorOperation(BoundSizeOfOperator boundSizeOfOperator)
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
ITypeSymbol? publicTypeSymbol = boundSizeOfOperator.SourceType.GetPublicTypeSymbol();
SyntaxNode syntax = boundSizeOfOperator.Syntax;
ITypeSymbol publicTypeSymbol2 = boundSizeOfOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundSizeOfOperator.ConstantValueOpt;
bool wasCompilerGenerated = boundSizeOfOperator.WasCompilerGenerated;
return (ISizeOfOperation)new SizeOfOperation(publicTypeSymbol, _semanticModel, syntax, publicTypeSymbol2, constantValueOpt, wasCompilerGenerated);
}
private ITypeOfOperation CreateBoundTypeOfOperatorOperation(BoundTypeOfOperator boundTypeOfOperator)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Expected O, but got Unknown
ITypeSymbol? publicTypeSymbol = boundTypeOfOperator.SourceType.GetPublicTypeSymbol();
SyntaxNode syntax = boundTypeOfOperator.Syntax;
ITypeSymbol publicTypeSymbol2 = boundTypeOfOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundTypeOfOperator.WasCompilerGenerated;
return (ITypeOfOperation)new TypeOfOperation(publicTypeSymbol, _semanticModel, syntax, publicTypeSymbol2, wasCompilerGenerated);
}
private IArrayCreationOperation CreateBoundArrayCreationOperation(BoundArrayCreation boundArrayCreation)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundArrayCreation.Bounds);
IArrayInitializerOperation val = (IArrayInitializerOperation)Create(boundArrayCreation.InitializerOpt);
SyntaxNode syntax = boundArrayCreation.Syntax;
ITypeSymbol publicTypeSymbol = boundArrayCreation.GetPublicTypeSymbol();
bool flag = boundArrayCreation.WasCompilerGenerated || (boundArrayCreation.InitializerOpt?.Syntax == syntax && !boundArrayCreation.InitializerOpt.WasCompilerGenerated);
return (IArrayCreationOperation)new ArrayCreationOperation(immutableArray, val, _semanticModel, syntax, publicTypeSymbol, flag);
}
private IArrayInitializerOperation CreateBoundArrayInitializationOperation(BoundArrayInitialization boundArrayInitialization)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundArrayInitialization.Initializers);
SyntaxNode syntax = boundArrayInitialization.Syntax;
bool wasCompilerGenerated = boundArrayInitialization.WasCompilerGenerated;
return (IArrayInitializerOperation)new ArrayInitializerOperation(immutableArray, _semanticModel, syntax, wasCompilerGenerated);
}
private IOperation CreateBoundCollectionExpression(BoundCollectionExpression boundCollectionExpression)
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = createChildren(boundCollectionExpression.Elements);
SyntaxNode syntax = boundCollectionExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundCollectionExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundCollectionExpression.WasCompilerGenerated;
return (IOperation)new NoneOperation(immutableArray, _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
IOperation? createChild(BoundExpression expression)
{
BoundExpression boundExpression = ((!(expression is BoundCollectionElementInitializer boundCollectionElementInitializer)) ? expression : boundCollectionElementInitializer.Arguments.First());
BoundExpression boundNode = boundExpression;
return Create(boundNode);
}
ImmutableArray<IOperation> createChildren(ImmutableArray<BoundExpression> elements)
{
ArrayBuilder<IOperation> instance = ArrayBuilder<IOperation>.GetInstance(elements.Length);
ImmutableArray<BoundExpression>.Enumerator enumerator = elements.GetEnumerator();
while (enumerator.MoveNext())
{
BoundExpression current = enumerator.Current;
IOperation val = createChild(current);
if (val != null)
{
instance.Add(val);
}
}
return instance.ToImmutableAndFree();
}
}
private IOperation CreateBoundCollectionExpressionSpreadElement(BoundCollectionExpressionSpreadElement boundSpreadExpression)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
SyntaxNode syntax = boundSpreadExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundSpreadExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundSpreadExpression.WasCompilerGenerated;
return (IOperation)new NoneOperation(ImmutableArray.Create<IOperation>(Create(boundSpreadExpression.Expression)), _semanticModel, syntax, publicTypeSymbol, (ConstantValue)null, wasCompilerGenerated);
}
private IDefaultValueOperation CreateBoundDefaultLiteralOperation(BoundDefaultLiteral boundDefaultLiteral)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = boundDefaultLiteral.Syntax;
ConstantValue constantValueOpt = boundDefaultLiteral.ConstantValueOpt;
bool wasCompilerGenerated = boundDefaultLiteral.WasCompilerGenerated;
return (IDefaultValueOperation)new DefaultValueOperation(_semanticModel, syntax, (ITypeSymbol)null, constantValueOpt, wasCompilerGenerated);
}
private IDefaultValueOperation CreateBoundDefaultExpressionOperation(BoundDefaultExpression boundDefaultExpression)
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
SyntaxNode syntax = boundDefaultExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundDefaultExpression.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundDefaultExpression.ConstantValueOpt;
bool wasCompilerGenerated = boundDefaultExpression.WasCompilerGenerated;
return (IDefaultValueOperation)new DefaultValueOperation(_semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IInstanceReferenceOperation CreateBoundBaseReferenceOperation(BoundBaseReference boundBaseReference)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = boundBaseReference.Syntax;
ITypeSymbol publicTypeSymbol = boundBaseReference.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundBaseReference.WasCompilerGenerated;
return (IInstanceReferenceOperation)new InstanceReferenceOperation((InstanceReferenceKind)0, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IInstanceReferenceOperation CreateBoundThisReferenceOperation(BoundThisReference boundThisReference)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = boundThisReference.Syntax;
ITypeSymbol publicTypeSymbol = boundThisReference.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundThisReference.WasCompilerGenerated;
return (IInstanceReferenceOperation)new InstanceReferenceOperation((InstanceReferenceKind)0, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundAssignmentOperatorOrMemberInitializerOperation(BoundAssignmentOperator boundAssignmentOperator)
{
if (!IsMemberInitializer(boundAssignmentOperator))
{
return (IOperation)(object)CreateBoundAssignmentOperatorOperation(boundAssignmentOperator);
}
return (IOperation)(object)CreateBoundMemberInitializerOperation(boundAssignmentOperator);
}
private static bool IsMemberInitializer(BoundAssignmentOperator boundAssignmentOperator)
{
BoundExpression right = boundAssignmentOperator.Right;
if (right == null || right.Kind != BoundKind.ObjectInitializerExpression)
{
BoundExpression right2 = boundAssignmentOperator.Right;
if (right2 == null)
{
return false;
}
return right2.Kind == BoundKind.CollectionInitializerExpression;
}
return true;
}
private ISimpleAssignmentOperation CreateBoundAssignmentOperatorOperation(BoundAssignmentOperator boundAssignmentOperator)
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected O, but got Unknown
IOperation val = Create(boundAssignmentOperator.Left);
IOperation val2 = Create(boundAssignmentOperator.Right);
bool isRef = boundAssignmentOperator.IsRef;
SyntaxNode syntax = boundAssignmentOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundAssignmentOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundAssignmentOperator.ConstantValueOpt;
bool wasCompilerGenerated = boundAssignmentOperator.WasCompilerGenerated;
return (ISimpleAssignmentOperation)new SimpleAssignmentOperation(isRef, val, val2, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IMemberInitializerOperation CreateBoundMemberInitializerOperation(BoundAssignmentOperator boundAssignmentOperator)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
IOperation obj = CreateMemberInitializerInitializedMember(boundAssignmentOperator.Left);
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(boundAssignmentOperator.Right);
SyntaxNode syntax = boundAssignmentOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundAssignmentOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundAssignmentOperator.WasCompilerGenerated;
return (IMemberInitializerOperation)new MemberInitializerOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private ICompoundAssignmentOperation CreateBoundCompoundAssignmentOperatorOperation(BoundCompoundAssignmentOperator boundCompoundAssignmentOperator)
{
//IL_0025: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Expected O, but got Unknown
IOperation val = Create(boundCompoundAssignmentOperator.Left);
IOperation val2 = Create(boundCompoundAssignmentOperator.Right);
BinaryOperatorKind val3 = Helper.DeriveBinaryOperatorKind(boundCompoundAssignmentOperator.Operator.Kind);
Conversion conversion = BoundNode.GetConversion(boundCompoundAssignmentOperator.LeftConversion, boundCompoundAssignmentOperator.LeftPlaceholder);
Conversion conversion2 = BoundNode.GetConversion(boundCompoundAssignmentOperator.FinalConversion, boundCompoundAssignmentOperator.FinalPlaceholder);
bool flag = boundCompoundAssignmentOperator.Operator.Kind.IsLifted();
MethodSymbol method = boundCompoundAssignmentOperator.Operator.Method;
bool flag2 = boundCompoundAssignmentOperator.Operator.Kind.IsChecked() || ((object)method != null && SyntaxFacts.IsCheckedOperator(method.Name));
IMethodSymbol publicSymbol = method.GetPublicSymbol();
SyntaxNode syntax = boundCompoundAssignmentOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundCompoundAssignmentOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundCompoundAssignmentOperator.WasCompilerGenerated;
return (ICompoundAssignmentOperation)new CompoundAssignmentOperation((IConvertibleConversion)(object)conversion, (IConvertibleConversion)(object)conversion2, val3, flag, flag2, publicSymbol, (ITypeSymbol)(object)GetConstrainedToTypeForOperator(method, boundCompoundAssignmentOperator.Operator.ConstrainedToTypeOpt).GetPublicSymbol(), val, val2, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt)
{
if ((object)operatorMethod != null && operatorMethod.IsStatic && (operatorMethod.IsAbstract || operatorMethod.IsVirtual) && constrainedToTypeOpt is TypeParameterSymbol result)
{
return result;
}
return null;
}
private IIncrementOrDecrementOperation CreateBoundIncrementOperatorOperation(BoundIncrementOperator boundIncrementOperator)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Expected O, but got Unknown
OperationKind val = (OperationKind)(Helper.IsDecrement(boundIncrementOperator.OperatorKind) ? 68 : 66);
bool num = Helper.IsPostfixIncrementOrDecrement(boundIncrementOperator.OperatorKind);
bool flag = boundIncrementOperator.OperatorKind.IsLifted();
bool flag2 = boundIncrementOperator.OperatorKind.IsChecked() || ((object)boundIncrementOperator.MethodOpt != null && SyntaxFacts.IsCheckedOperator(boundIncrementOperator.MethodOpt.Name));
IOperation val2 = Create(boundIncrementOperator.Operand);
IMethodSymbol publicSymbol = boundIncrementOperator.MethodOpt.GetPublicSymbol();
SyntaxNode syntax = boundIncrementOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundIncrementOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundIncrementOperator.WasCompilerGenerated;
return (IIncrementOrDecrementOperation)new IncrementOrDecrementOperation(num, flag, flag2, val2, publicSymbol, (ITypeSymbol)(object)GetConstrainedToTypeForOperator(boundIncrementOperator.MethodOpt, boundIncrementOperator.ConstrainedToTypeOpt).GetPublicSymbol(), val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IInvalidOperation CreateBoundBadExpressionOperation(BoundBadExpression boundBadExpression)
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
SyntaxNode syntax = boundBadExpression.Syntax;
ITypeSymbol val = (syntax.IsMissing ? null : boundBadExpression.GetPublicTypeSymbol());
bool flag = boundBadExpression.WasCompilerGenerated || ImmutableArrayExtensions.Any<BoundExpression, BoundBadExpression>(boundBadExpression.ChildBoundNodes, (Func<BoundExpression, BoundBadExpression, bool>)((BoundExpression e, BoundBadExpression boundBadExpression2) => e?.Syntax == boundBadExpression2.Syntax), boundBadExpression);
return (IInvalidOperation)new InvalidOperation(this.CreateFromArray<BoundExpression, IOperation>(boundBadExpression.ChildBoundNodes), _semanticModel, syntax, val, (ConstantValue)null, flag);
}
private ITypeParameterObjectCreationOperation CreateBoundNewTOperation(BoundNewT boundNewT)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(boundNewT.InitializerExpressionOpt);
SyntaxNode syntax = boundNewT.Syntax;
ITypeSymbol publicTypeSymbol = boundNewT.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundNewT.WasCompilerGenerated;
return (ITypeParameterObjectCreationOperation)new TypeParameterObjectCreationOperation(val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private INoPiaObjectCreationOperation CreateNoPiaObjectCreationExpressionOperation(BoundNoPiaObjectCreationExpression creation)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
IObjectOrCollectionInitializerOperation val = (IObjectOrCollectionInitializerOperation)Create(creation.InitializerExpressionOpt);
SyntaxNode syntax = creation.Syntax;
ITypeSymbol publicTypeSymbol = creation.GetPublicTypeSymbol();
bool wasCompilerGenerated = creation.WasCompilerGenerated;
return (INoPiaObjectCreationOperation)new NoPiaObjectCreationOperation(val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IUnaryOperation CreateBoundUnaryOperatorOperation(BoundUnaryOperator boundUnaryOperator)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Expected O, but got Unknown
UnaryOperatorKind val = Helper.DeriveUnaryOperatorKind(boundUnaryOperator.OperatorKind);
IOperation val2 = Create(boundUnaryOperator.Operand);
IMethodSymbol publicSymbol = boundUnaryOperator.MethodOpt.GetPublicSymbol();
SyntaxNode syntax = boundUnaryOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundUnaryOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundUnaryOperator.ConstantValueOpt;
bool flag = boundUnaryOperator.OperatorKind.IsLifted();
bool flag2 = boundUnaryOperator.OperatorKind.IsChecked() || ((object)boundUnaryOperator.MethodOpt != null && SyntaxFacts.IsCheckedOperator(boundUnaryOperator.MethodOpt.Name));
bool wasCompilerGenerated = boundUnaryOperator.WasCompilerGenerated;
return (IUnaryOperation)new UnaryOperation(val, val2, flag, flag2, publicSymbol, (ITypeSymbol)(object)GetConstrainedToTypeForOperator(boundUnaryOperator.MethodOpt, boundUnaryOperator.ConstrainedToTypeOpt).GetPublicSymbol(), _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IOperation CreateBoundBinaryOperatorBase(BoundBinaryOperatorBase boundBinaryOperatorBase)
{
if (boundBinaryOperatorBase is BoundBinaryOperator { InterpolatedStringHandlerData: not null } boundBinaryOperator)
{
return CreateBoundInterpolatedStringBinaryOperator(boundBinaryOperator);
}
ArrayBuilder<BoundBinaryOperatorBase> instance = ArrayBuilder<BoundBinaryOperatorBase>.GetInstance();
BoundBinaryOperatorBase boundBinaryOperatorBase2 = boundBinaryOperatorBase;
do
{
ArrayBuilderExtensions.Push<BoundBinaryOperatorBase>(instance, boundBinaryOperatorBase2);
boundBinaryOperatorBase2 = boundBinaryOperatorBase2.Left as BoundBinaryOperatorBase;
}
while ((boundBinaryOperatorBase2 != null && !(boundBinaryOperatorBase2 is BoundBinaryOperator { InterpolatedStringHandlerData: not null })) ? true : false);
IOperation val = null;
IBinaryOperation val2 = default(IBinaryOperation);
while (ArrayBuilderExtensions.TryPop<BoundBinaryOperatorBase>(instance, ref boundBinaryOperatorBase2))
{
if (val == null)
{
val = Create(boundBinaryOperatorBase2.Left);
}
IOperation right = Create(boundBinaryOperatorBase2.Right);
if (!(boundBinaryOperatorBase2 is BoundBinaryOperator boundBinaryOperator3))
{
if (!(boundBinaryOperatorBase2 is BoundUserDefinedConditionalLogicalOperator boundBinaryOperator4))
{
if (boundBinaryOperatorBase2 != null)
{
BoundKind kind = boundBinaryOperatorBase2.Kind;
throw ExceptionUtilities.UnexpectedValue((object)kind);
}
global::_003CPrivateImplementationDetails_003E.ThrowInvalidOperationException();
}
else
{
val2 = createBoundUserDefinedConditionalLogicalOperator(boundBinaryOperator4, val, right);
}
}
else
{
val2 = CreateBoundBinaryOperatorOperation(boundBinaryOperator3, val, right);
}
val = (IOperation)(object)val2;
}
instance.Free();
return val;
IBinaryOperation createBoundUserDefinedConditionalLogicalOperator(BoundUserDefinedConditionalLogicalOperator boundUserDefinedConditionalLogicalOperator, IOperation left, IOperation val5)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
BinaryOperatorKind val3 = Helper.DeriveBinaryOperatorKind(boundUserDefinedConditionalLogicalOperator.OperatorKind);
IMethodSymbol publicSymbol = boundUserDefinedConditionalLogicalOperator.LogicalOperator.GetPublicSymbol();
IMethodSymbol val4 = ((boundUserDefinedConditionalLogicalOperator.OperatorKind.Operator() == BinaryOperatorKind.And) ? boundUserDefinedConditionalLogicalOperator.FalseOperator.GetPublicSymbol() : boundUserDefinedConditionalLogicalOperator.TrueOperator.GetPublicSymbol());
SyntaxNode syntax = boundUserDefinedConditionalLogicalOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundUserDefinedConditionalLogicalOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundUserDefinedConditionalLogicalOperator.ConstantValueOpt;
bool flag = boundUserDefinedConditionalLogicalOperator.OperatorKind.IsLifted();
bool flag2 = boundUserDefinedConditionalLogicalOperator.OperatorKind.IsChecked();
bool flag3 = false;
bool wasCompilerGenerated = boundUserDefinedConditionalLogicalOperator.WasCompilerGenerated;
TypeSymbol symbol = GetConstrainedToTypeForOperator(boundUserDefinedConditionalLogicalOperator.LogicalOperator, boundUserDefinedConditionalLogicalOperator.ConstrainedToTypeOpt) ?? GetConstrainedToTypeForOperator((boundUserDefinedConditionalLogicalOperator.OperatorKind.Operator() == BinaryOperatorKind.And) ? boundUserDefinedConditionalLogicalOperator.FalseOperator : boundUserDefinedConditionalLogicalOperator.TrueOperator, boundUserDefinedConditionalLogicalOperator.ConstrainedToTypeOpt);
return (IBinaryOperation)new BinaryOperation(val3, left, val5, flag, flag2, flag3, publicSymbol, symbol.GetPublicSymbol(), val4, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
}
private IBinaryOperation CreateBoundBinaryOperatorOperation(BoundBinaryOperator boundBinaryOperator, IOperation left, IOperation right)
{
//IL_0006: 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_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Invalid comparison between Unknown and I4
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Invalid comparison between Unknown and I4
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Expected O, but got Unknown
BinaryOperatorKind val = Helper.DeriveBinaryOperatorKind(boundBinaryOperator.OperatorKind);
IMethodSymbol val2 = boundBinaryOperator.Method.GetPublicSymbol();
IMethodSymbol val3 = null;
if (boundBinaryOperator.Type.IsDynamic() && ((int)val == 13 || (int)val == 14) && val2 != null && val2.Parameters.Length == 1)
{
val3 = val2;
val2 = null;
}
SyntaxNode syntax = boundBinaryOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundBinaryOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundBinaryOperator.ConstantValueOpt;
bool flag = boundBinaryOperator.OperatorKind.IsLifted();
bool flag2 = boundBinaryOperator.OperatorKind.IsChecked() || ((object)boundBinaryOperator.Method != null && SyntaxFacts.IsCheckedOperator(boundBinaryOperator.Method.Name));
bool flag3 = false;
bool wasCompilerGenerated = boundBinaryOperator.WasCompilerGenerated;
return (IBinaryOperation)new BinaryOperation(val, left, right, flag, flag2, flag3, val2, (ITypeSymbol)(object)GetConstrainedToTypeForOperator(boundBinaryOperator.Method, boundBinaryOperator.ConstrainedToType).GetPublicSymbol(), val3, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IOperation CreateBoundInterpolatedStringBinaryOperator(BoundBinaryOperator boundBinaryOperator)
{
Func<BoundInterpolatedString, int, (CSharpOperationFactory, InterpolatedStringHandlerData), IOperation> interpolatedStringFactory = createInterpolatedStringOperand;
Func<BoundBinaryOperator, IOperation, IOperation, (CSharpOperationFactory, InterpolatedStringHandlerData), IOperation> binaryOperatorFactory = createBoundBinaryOperatorOperation;
return boundBinaryOperator.RewriteInterpolatedStringAddition((this, boundBinaryOperator.InterpolatedStringHandlerData.GetValueOrDefault()), interpolatedStringFactory, binaryOperatorFactory);
static IBinaryOperation createBoundBinaryOperatorOperation(BoundBinaryOperator boundBinaryOperator2, IOperation left, IOperation right, (CSharpOperationFactory @this, InterpolatedStringHandlerData _) arg)
{
return arg.@this.CreateBoundBinaryOperatorOperation(boundBinaryOperator2, left, right);
}
static IInterpolatedStringOperation createInterpolatedStringOperand(BoundInterpolatedString boundInterpolatedString, int i, (CSharpOperationFactory @this, InterpolatedStringHandlerData Data) arg)
{
return arg.@this.CreateBoundInterpolatedStringExpressionOperation(boundInterpolatedString, arg.Data.PositionInfo[i]);
}
}
private ITupleBinaryOperation CreateBoundTupleBinaryOperatorOperation(BoundTupleBinaryOperator boundTupleBinaryOperator)
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
IOperation val = Create(boundTupleBinaryOperator.Left);
IOperation val2 = Create(boundTupleBinaryOperator.Right);
BinaryOperatorKind val3 = Helper.DeriveBinaryOperatorKind(boundTupleBinaryOperator.OperatorKind);
SyntaxNode syntax = boundTupleBinaryOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundTupleBinaryOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundTupleBinaryOperator.WasCompilerGenerated;
return (ITupleBinaryOperation)new TupleBinaryOperation(val3, val, val2, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IConditionalOperation CreateBoundConditionalOperatorOperation(BoundConditionalOperator boundConditionalOperator)
{
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
IOperation? obj = Create(boundConditionalOperator.Condition);
IOperation val = Create(boundConditionalOperator.Consequence);
IOperation val2 = Create(boundConditionalOperator.Alternative);
bool isRef = boundConditionalOperator.IsRef;
SyntaxNode syntax = boundConditionalOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundConditionalOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundConditionalOperator.ConstantValueOpt;
bool wasCompilerGenerated = boundConditionalOperator.WasCompilerGenerated;
return (IConditionalOperation)new ConditionalOperation(obj, val, val2, isRef, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private ICoalesceOperation CreateBoundNullCoalescingOperatorOperation(BoundNullCoalescingOperator boundNullCoalescingOperator)
{
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Expected O, but got Unknown
IOperation? obj = Create(boundNullCoalescingOperator.LeftOperand);
IOperation val = Create(boundNullCoalescingOperator.RightOperand);
SyntaxNode syntax = boundNullCoalescingOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundNullCoalescingOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundNullCoalescingOperator.ConstantValueOpt;
bool wasCompilerGenerated = boundNullCoalescingOperator.WasCompilerGenerated;
Conversion conversion = BoundNode.GetConversion(boundNullCoalescingOperator.LeftConversion, boundNullCoalescingOperator.LeftPlaceholder);
if (conversion.Exists && !conversion.IsIdentity && boundNullCoalescingOperator.Type.Equals(boundNullCoalescingOperator.LeftOperand.Type?.StrippedType(), (TypeCompareKind)9))
{
conversion = Conversion.Identity;
}
return (ICoalesceOperation)new CoalesceOperation(obj, val, (IConvertibleConversion)(object)conversion, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IOperation CreateBoundNullCoalescingAssignmentOperatorOperation(BoundNullCoalescingAssignmentOperator boundNode)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
IOperation? obj = Create(boundNode.LeftOperand);
IOperation val = Create(boundNode.RightOperand);
SyntaxNode syntax = boundNode.Syntax;
ITypeSymbol publicTypeSymbol = boundNode.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundNode.WasCompilerGenerated;
return (IOperation)new CoalesceAssignmentOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IAwaitOperation CreateBoundAwaitExpressionOperation(BoundAwaitExpression boundAwaitExpression)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
IOperation? obj = Create(boundAwaitExpression.Expression);
SyntaxNode syntax = boundAwaitExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundAwaitExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundAwaitExpression.WasCompilerGenerated;
return (IAwaitOperation)new AwaitOperation(obj, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IArrayElementReferenceOperation CreateBoundArrayAccessOperation(BoundArrayAccess boundArrayAccess)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
IOperation? obj = Create(boundArrayAccess.Expression);
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundArrayAccess.Indices);
SyntaxNode syntax = boundArrayAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundArrayAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundArrayAccess.WasCompilerGenerated;
return (IArrayElementReferenceOperation)new ArrayElementReferenceOperation(obj, immutableArray, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundImplicitIndexerAccessOperation(BoundImplicitIndexerAccess boundIndexerAccess)
{
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Expected O, but got Unknown
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
IOperation val = Create(boundIndexerAccess.Receiver);
IOperation val2 = Create(boundIndexerAccess.Argument);
SyntaxNode syntax = boundIndexerAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundIndexerAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundIndexerAccess.WasCompilerGenerated;
if (boundIndexerAccess.LengthOrCountAccess.Kind != BoundKind.ArrayLength)
{
BoundExpression receiver;
SyntaxNode propertySyntax;
IPropertySymbol publicSymbol = Binder.GetPropertySymbol(boundIndexerAccess.LengthOrCountAccess, out receiver, out propertySyntax).GetPublicSymbol();
ISymbol publicSymbol2 = Binder.GetIndexerOrImplicitIndexerSymbol(boundIndexerAccess).GetPublicSymbol();
return (IOperation)new ImplicitIndexerReferenceOperation(val, val2, (ISymbol)(object)publicSymbol, publicSymbol2, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
return (IOperation)new ArrayElementReferenceOperation(val, ImmutableArray.Create<IOperation>(val2), _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IInlineArrayAccessOperation CreateBoundInlineArrayAccessOperation(BoundInlineArrayAccess boundInlineArrayAccess)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
IOperation? obj = Create(boundInlineArrayAccess.Expression);
IOperation val = Create(boundInlineArrayAccess.Argument);
SyntaxNode syntax = boundInlineArrayAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundInlineArrayAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundInlineArrayAccess.WasCompilerGenerated;
return (IInlineArrayAccessOperation)new InlineArrayAccessOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private INameOfOperation CreateBoundNameOfOperatorOperation(BoundNameOfOperator boundNameOfOperator)
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
IOperation? obj = Create(boundNameOfOperator.Argument);
SyntaxNode syntax = boundNameOfOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundNameOfOperator.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundNameOfOperator.ConstantValueOpt;
bool wasCompilerGenerated = boundNameOfOperator.WasCompilerGenerated;
return (INameOfOperation)new NameOfOperation(obj, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
private IThrowOperation CreateBoundThrowExpressionOperation(BoundThrowExpression boundThrowExpression)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
IOperation? obj = Create(boundThrowExpression.Expression);
SyntaxNode syntax = boundThrowExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundThrowExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundThrowExpression.WasCompilerGenerated;
return (IThrowOperation)new ThrowOperation(obj, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IAddressOfOperation CreateBoundAddressOfOperatorOperation(BoundAddressOfOperator boundAddressOfOperator)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
IOperation? obj = Create(boundAddressOfOperator.Operand);
SyntaxNode syntax = boundAddressOfOperator.Syntax;
ITypeSymbol publicTypeSymbol = boundAddressOfOperator.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundAddressOfOperator.WasCompilerGenerated;
return (IAddressOfOperation)new AddressOfOperation(obj, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IInstanceReferenceOperation CreateBoundImplicitReceiverOperation(BoundImplicitReceiver boundImplicitReceiver)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = boundImplicitReceiver.Syntax;
ITypeSymbol publicTypeSymbol = boundImplicitReceiver.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundImplicitReceiver.WasCompilerGenerated;
return (IInstanceReferenceOperation)new InstanceReferenceOperation((InstanceReferenceKind)1, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IConditionalAccessOperation CreateBoundConditionalAccessOperation(BoundConditionalAccess boundConditionalAccess)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
IOperation? obj = Create(boundConditionalAccess.Receiver);
IOperation val = Create(boundConditionalAccess.AccessExpression);
SyntaxNode syntax = boundConditionalAccess.Syntax;
ITypeSymbol publicTypeSymbol = boundConditionalAccess.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundConditionalAccess.WasCompilerGenerated;
return (IConditionalAccessOperation)new ConditionalAccessOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IConditionalAccessInstanceOperation CreateBoundConditionalReceiverOperation(BoundConditionalReceiver boundConditionalReceiver)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
SyntaxNode syntax = boundConditionalReceiver.Syntax;
ITypeSymbol publicTypeSymbol = boundConditionalReceiver.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundConditionalReceiver.WasCompilerGenerated;
return (IConditionalAccessInstanceOperation)new ConditionalAccessInstanceOperation(_semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IFieldInitializerOperation CreateBoundFieldEqualsValueOperation(BoundFieldEqualsValue boundFieldEqualsValue)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Expected O, but got Unknown
ImmutableArray<IFieldSymbol> immutableArray = ImmutableArray.Create<IFieldSymbol>(boundFieldEqualsValue.Field.GetPublicSymbol());
IOperation val = Create(boundFieldEqualsValue.Value);
SyntaxNode syntax = boundFieldEqualsValue.Syntax;
bool wasCompilerGenerated = boundFieldEqualsValue.WasCompilerGenerated;
return (IFieldInitializerOperation)new FieldInitializerOperation(immutableArray, boundFieldEqualsValue.Locals.GetPublicSymbols(), val, _semanticModel, syntax, wasCompilerGenerated);
}
private IPropertyInitializerOperation CreateBoundPropertyEqualsValueOperation(BoundPropertyEqualsValue boundPropertyEqualsValue)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Expected O, but got Unknown
ImmutableArray<IPropertySymbol> immutableArray = ImmutableArray.Create<IPropertySymbol>(boundPropertyEqualsValue.Property.GetPublicSymbol());
IOperation val = Create(boundPropertyEqualsValue.Value);
SyntaxNode syntax = boundPropertyEqualsValue.Syntax;
bool wasCompilerGenerated = boundPropertyEqualsValue.WasCompilerGenerated;
return (IPropertyInitializerOperation)new PropertyInitializerOperation(immutableArray, boundPropertyEqualsValue.Locals.GetPublicSymbols(), val, _semanticModel, syntax, wasCompilerGenerated);
}
private IParameterInitializerOperation CreateBoundParameterEqualsValueOperation(BoundParameterEqualsValue boundParameterEqualsValue)
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
IParameterSymbol? publicSymbol = boundParameterEqualsValue.Parameter.GetPublicSymbol();
IOperation val = Create(boundParameterEqualsValue.Value);
SyntaxNode syntax = boundParameterEqualsValue.Syntax;
bool wasCompilerGenerated = boundParameterEqualsValue.WasCompilerGenerated;
return (IParameterInitializerOperation)new ParameterInitializerOperation(publicSymbol, boundParameterEqualsValue.Locals.GetPublicSymbols(), val, _semanticModel, syntax, wasCompilerGenerated);
}
private IBlockOperation CreateBoundBlockOperation(BoundBlock boundBlock)
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundStatement, IOperation>(boundBlock.Statements);
ImmutableArray<ILocalSymbol> publicSymbols = boundBlock.Locals.GetPublicSymbols();
SyntaxNode syntax = boundBlock.Syntax;
bool wasCompilerGenerated = boundBlock.WasCompilerGenerated;
return (IBlockOperation)new BlockOperation(immutableArray, publicSymbols, _semanticModel, syntax, wasCompilerGenerated);
}
private IBranchOperation CreateBoundContinueStatementOperation(BoundContinueStatement boundContinueStatement)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
ILabelSymbol? publicSymbol = boundContinueStatement.Label.GetPublicSymbol();
BranchKind val = (BranchKind)1;
SyntaxNode syntax = boundContinueStatement.Syntax;
bool wasCompilerGenerated = boundContinueStatement.WasCompilerGenerated;
return (IBranchOperation)new BranchOperation(publicSymbol, val, _semanticModel, syntax, wasCompilerGenerated);
}
private IBranchOperation CreateBoundBreakStatementOperation(BoundBreakStatement boundBreakStatement)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
ILabelSymbol? publicSymbol = boundBreakStatement.Label.GetPublicSymbol();
BranchKind val = (BranchKind)2;
SyntaxNode syntax = boundBreakStatement.Syntax;
bool wasCompilerGenerated = boundBreakStatement.WasCompilerGenerated;
return (IBranchOperation)new BranchOperation(publicSymbol, val, _semanticModel, syntax, wasCompilerGenerated);
}
private IReturnOperation CreateBoundYieldBreakStatementOperation(BoundYieldBreakStatement boundYieldBreakStatement)
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Expected O, but got Unknown
SyntaxNode syntax = boundYieldBreakStatement.Syntax;
bool wasCompilerGenerated = boundYieldBreakStatement.WasCompilerGenerated;
return (IReturnOperation)new ReturnOperation((IOperation)null, (OperationKind)10, _semanticModel, syntax, wasCompilerGenerated);
}
private IBranchOperation CreateBoundGotoStatementOperation(BoundGotoStatement boundGotoStatement)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
ILabelSymbol? publicSymbol = boundGotoStatement.Label.GetPublicSymbol();
BranchKind val = (BranchKind)3;
SyntaxNode syntax = boundGotoStatement.Syntax;
bool wasCompilerGenerated = boundGotoStatement.WasCompilerGenerated;
return (IBranchOperation)new BranchOperation(publicSymbol, val, _semanticModel, syntax, wasCompilerGenerated);
}
private IEmptyOperation CreateBoundNoOpStatementOperation(BoundNoOpStatement boundNoOpStatement)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
SyntaxNode syntax = boundNoOpStatement.Syntax;
bool wasCompilerGenerated = boundNoOpStatement.WasCompilerGenerated;
return (IEmptyOperation)new EmptyOperation(_semanticModel, syntax, wasCompilerGenerated);
}
private IConditionalOperation CreateBoundIfStatementOperation(BoundIfStatement boundIfStatement)
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Expected O, but got Unknown
IOperation? obj = Create(boundIfStatement.Condition);
IOperation val = Create(boundIfStatement.Consequence);
IOperation val2 = Create(boundIfStatement.AlternativeOpt);
bool flag = false;
SyntaxNode syntax = boundIfStatement.Syntax;
ITypeSymbol val3 = null;
ConstantValue val4 = null;
bool wasCompilerGenerated = boundIfStatement.WasCompilerGenerated;
return (IConditionalOperation)new ConditionalOperation(obj, val, val2, flag, _semanticModel, syntax, val3, val4, wasCompilerGenerated);
}
private IWhileLoopOperation CreateBoundWhileStatementOperation(BoundWhileStatement boundWhileStatement)
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
IOperation? obj = Create(boundWhileStatement.Condition);
IOperation val = Create(boundWhileStatement.Body);
ImmutableArray<ILocalSymbol> publicSymbols = boundWhileStatement.Locals.GetPublicSymbols();
ILabelSymbol publicSymbol = boundWhileStatement.ContinueLabel.GetPublicSymbol();
ILabelSymbol publicSymbol2 = boundWhileStatement.BreakLabel.GetPublicSymbol();
bool flag = true;
bool flag2 = false;
SyntaxNode syntax = boundWhileStatement.Syntax;
bool wasCompilerGenerated = boundWhileStatement.WasCompilerGenerated;
return (IWhileLoopOperation)new WhileLoopOperation(obj, flag, flag2, (IOperation)null, val, publicSymbols, publicSymbol, publicSymbol2, _semanticModel, syntax, wasCompilerGenerated);
}
private IWhileLoopOperation CreateBoundDoStatementOperation(BoundDoStatement boundDoStatement)
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
IOperation? obj = Create(boundDoStatement.Condition);
IOperation val = Create(boundDoStatement.Body);
ILabelSymbol publicSymbol = boundDoStatement.ContinueLabel.GetPublicSymbol();
ILabelSymbol publicSymbol2 = boundDoStatement.BreakLabel.GetPublicSymbol();
bool flag = false;
bool flag2 = false;
ImmutableArray<ILocalSymbol> publicSymbols = boundDoStatement.Locals.GetPublicSymbols();
SyntaxNode syntax = boundDoStatement.Syntax;
bool wasCompilerGenerated = boundDoStatement.WasCompilerGenerated;
return (IWhileLoopOperation)new WhileLoopOperation(obj, flag, flag2, (IOperation)null, val, publicSymbols, publicSymbol, publicSymbol2, _semanticModel, syntax, wasCompilerGenerated);
}
private IForLoopOperation CreateBoundForStatementOperation(BoundForStatement boundForStatement)
{
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Expected O, but got Unknown
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundStatement, IOperation>(ToStatements(boundForStatement.Initializer));
IOperation val = Create(boundForStatement.Condition);
ImmutableArray<IOperation> immutableArray2 = this.CreateFromArray<BoundStatement, IOperation>(ToStatements(boundForStatement.Increment));
IOperation val2 = Create(boundForStatement.Body);
ImmutableArray<ILocalSymbol> publicSymbols = boundForStatement.OuterLocals.GetPublicSymbols();
ImmutableArray<ILocalSymbol> publicSymbols2 = boundForStatement.InnerLocals.GetPublicSymbols();
ILabelSymbol publicSymbol = boundForStatement.ContinueLabel.GetPublicSymbol();
ILabelSymbol publicSymbol2 = boundForStatement.BreakLabel.GetPublicSymbol();
SyntaxNode syntax = boundForStatement.Syntax;
bool wasCompilerGenerated = boundForStatement.WasCompilerGenerated;
return (IForLoopOperation)new ForLoopOperation(immutableArray, publicSymbols2, val, immutableArray2, val2, publicSymbols, publicSymbol, publicSymbol2, _semanticModel, syntax, wasCompilerGenerated);
}
internal ForEachLoopOperationInfo? GetForEachLoopOperatorInfo(BoundForEachStatement boundForEachStatement)
{
//IL_000d: 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)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Expected O, but got Unknown
ForEachEnumeratorInfo enumeratorInfoOpt = boundForEachStatement.EnumeratorInfoOpt;
if (enumeratorInfoOpt != null)
{
CompoundUseSiteInfo<AssemblySymbol> useSiteInfo = CompoundUseSiteInfo<AssemblySymbol>.Discarded;
CSharpCompilation cSharpCompilation = (CSharpCompilation)(object)_semanticModel.Compilation;
NamedTypeSymbol destination = (enumeratorInfoOpt.IsAsync ? cSharpCompilation.GetWellKnownType((WellKnownType)287) : cSharpCompilation.GetSpecialType((SpecialType)35));
ITypeSymbol? publicSymbol = enumeratorInfoOpt.ElementType.GetPublicSymbol();
IMethodSymbol? publicSymbol2 = enumeratorInfoOpt.GetEnumeratorInfo.Method.GetPublicSymbol();
IPropertySymbol? publicSymbol3 = ((PropertySymbol)enumeratorInfoOpt.CurrentPropertyGetter.AssociatedSymbol).GetPublicSymbol();
IMethodSymbol? publicSymbol4 = enumeratorInfoOpt.MoveNextInfo.Method.GetPublicSymbol();
bool isAsync = enumeratorInfoOpt.IsAsync;
object obj;
if ((int)enumeratorInfoOpt.InlineArraySpanType != 0)
{
IConvertibleConversion val = (IConvertibleConversion)(object)Conversion.InlineArray;
obj = val;
}
else
{
obj = null;
}
bool inlineArrayUsedAsValue = enumeratorInfoOpt.InlineArrayUsedAsValue;
bool needsDisposal = enumeratorInfoOpt.NeedsDisposal;
bool num = enumeratorInfoOpt.NeedsDisposal && cSharpCompilation.Conversions.ClassifyImplicitConversionFromType(enumeratorInfoOpt.GetEnumeratorInfo.Method.ReturnType, destination, ref useSiteInfo).IsImplicit;
IMethodSymbol? obj2 = enumeratorInfoOpt.PatternDisposeInfo?.Method.GetPublicSymbol();
object obj3 = BoundNode.GetConversion(enumeratorInfoOpt.CurrentConversion, enumeratorInfoOpt.CurrentPlaceholder);
object obj4 = BoundNode.GetConversion(boundForEachStatement.ElementConversion, boundForEachStatement.ElementPlaceholder);
ImmutableArray<IArgumentOperation> immutableArray = CreateArgumentOperations(enumeratorInfoOpt.GetEnumeratorInfo, boundForEachStatement.Expression.Syntax);
ImmutableArray<IArgumentOperation> immutableArray2 = CreateArgumentOperations(enumeratorInfoOpt.MoveNextInfo, boundForEachStatement.Expression.Syntax);
ImmutableArray<IArgumentOperation> immutableArray3 = (((object)enumeratorInfoOpt.PatternDisposeInfo != null) ? CreateDisposeArguments(enumeratorInfoOpt.PatternDisposeInfo, boundForEachStatement.Syntax) : default(ImmutableArray<IArgumentOperation>));
return new ForEachLoopOperationInfo(publicSymbol, publicSymbol2, publicSymbol3, publicSymbol4, isAsync, (IConvertibleConversion)obj, inlineArrayUsedAsValue, needsDisposal, num, obj2, (IConvertibleConversion)obj3, (IConvertibleConversion)obj4, immutableArray, immutableArray2, default(ImmutableArray<IArgumentOperation>), immutableArray3);
}
return null;
ImmutableArray<IArgumentOperation> CreateArgumentOperations(MethodArgumentInfo? info, SyntaxNode invocationSyntax)
{
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
if (info == null)
{
return default(ImmutableArray<IArgumentOperation>);
}
if (info.Arguments.Length == 0)
{
return ImmutableArray<IArgumentOperation>.Empty;
}
return Operation.SetParentOperation<IArgumentOperation>(DeriveArguments(info.Method, info.Arguments, default(ImmutableArray<int>), info.DefaultArguments, info.Expanded, invocationSyntax, info.Method.IsExtensionMethod), (IOperation)null);
}
}
internal IOperation CreateBoundForEachStatementLoopControlVariable(BoundForEachStatement boundForEachStatement)
{
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
if (boundForEachStatement.DeconstructionOpt != null)
{
return Create(boundForEachStatement.DeconstructionOpt.DeconstructionAssignment.Left);
}
if (boundForEachStatement.IterationErrorExpressionOpt != null)
{
return Create(boundForEachStatement.IterationErrorExpressionOpt);
}
LocalSymbol symbol = boundForEachStatement.IterationVariables[0];
SyntaxNode syntax = boundForEachStatement.IterationVariableType.Syntax;
return (IOperation)new VariableDeclaratorOperation(symbol.GetPublicSymbol(), (IVariableInitializerOperation)null, ImmutableArray<IOperation>.Empty, _semanticModel, syntax, false);
}
private IForEachLoopOperation CreateBoundForEachStatementOperation(BoundForEachStatement boundForEachStatement)
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Expected O, but got Unknown
IOperation obj = CreateBoundForEachStatementLoopControlVariable(boundForEachStatement);
WellKnownType? val = boundForEachStatement.EnumeratorInfoOpt?.InlineArraySpanType;
bool flag = ((!val.HasValue || (int)val.GetValueOrDefault() == 0) ? true : false);
BoundExpression boundNode;
if (!flag && boundForEachStatement.Expression is BoundConversion { Conversion: { IsIdentity: not false }, ExplicitCastInCode: false } boundConversion)
{
BoundExpression operand = boundConversion.Operand;
if (operand != null)
{
boundNode = operand;
goto IL_0088;
}
}
boundNode = boundForEachStatement.Expression;
goto IL_0088;
IL_0088:
IOperation val2 = Create(boundNode);
ImmutableArray<IOperation> empty = ImmutableArray<IOperation>.Empty;
IOperation val3 = Create(boundForEachStatement.Body);
ForEachLoopOperationInfo forEachLoopOperatorInfo = GetForEachLoopOperatorInfo(boundForEachStatement);
ImmutableArray<ILocalSymbol> publicSymbols = boundForEachStatement.IterationVariables.GetPublicSymbols();
ILabelSymbol publicSymbol = boundForEachStatement.ContinueLabel.GetPublicSymbol();
ILabelSymbol publicSymbol2 = boundForEachStatement.BreakLabel.GetPublicSymbol();
SyntaxNode syntax = boundForEachStatement.Syntax;
bool wasCompilerGenerated = boundForEachStatement.WasCompilerGenerated;
bool flag2 = boundForEachStatement.AwaitOpt != null;
return (IForEachLoopOperation)new ForEachLoopOperation(obj, val2, empty, forEachLoopOperatorInfo, flag2, val3, publicSymbols, publicSymbol, publicSymbol2, _semanticModel, syntax, wasCompilerGenerated);
}
private ITryOperation CreateBoundTryStatementOperation(BoundTryStatement boundTryStatement)
{
//IL_000c: 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_0030: Expected O, but got Unknown
//IL_004e: Expected O, but got Unknown
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
IBlockOperation val = (IBlockOperation)Create(boundTryStatement.TryBlock);
ImmutableArray<ICatchClauseOperation> immutableArray = this.CreateFromArray<BoundCatchBlock, ICatchClauseOperation>(boundTryStatement.CatchBlocks);
IBlockOperation val2 = (IBlockOperation)Create(boundTryStatement.FinallyBlockOpt);
SyntaxNode syntax = boundTryStatement.Syntax;
bool wasCompilerGenerated = boundTryStatement.WasCompilerGenerated;
return (ITryOperation)new TryOperation(val, immutableArray, val2, (ILabelSymbol)null, _semanticModel, syntax, wasCompilerGenerated);
}
private ICatchClauseOperation CreateBoundCatchBlockOperation(BoundCatchBlock boundCatchBlock)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Expected O, but got Unknown
IVariableDeclaratorOperation? obj = CreateVariableDeclarator((BoundLocal)boundCatchBlock.ExceptionSourceOpt);
IOperation val = Create(boundCatchBlock.ExceptionFilterOpt);
IBlockOperation val2 = (IBlockOperation)Create(boundCatchBlock.Body);
ITypeSymbol val3 = (ITypeSymbol)(((object)boundCatchBlock.ExceptionTypeOpt.GetPublicSymbol()) ?? ((object)_semanticModel.Compilation.ObjectType));
ImmutableArray<ILocalSymbol> publicSymbols = boundCatchBlock.Locals.GetPublicSymbols();
SyntaxNode syntax = boundCatchBlock.Syntax;
bool wasCompilerGenerated = boundCatchBlock.WasCompilerGenerated;
return (ICatchClauseOperation)new CatchClauseOperation((IOperation)(object)obj, val3, publicSymbols, val, val2, _semanticModel, syntax, wasCompilerGenerated);
}
private IFixedOperation CreateBoundFixedStatementOperation(BoundFixedStatement boundFixedStatement)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
IVariableDeclarationGroupOperation val = (IVariableDeclarationGroupOperation)Create(boundFixedStatement.Declarations);
IOperation val2 = Create(boundFixedStatement.Body);
ImmutableArray<ILocalSymbol> publicSymbols = boundFixedStatement.Locals.GetPublicSymbols();
SyntaxNode syntax = boundFixedStatement.Syntax;
bool wasCompilerGenerated = boundFixedStatement.WasCompilerGenerated;
return (IFixedOperation)new FixedOperation(publicSymbols, val, val2, _semanticModel, syntax, wasCompilerGenerated);
}
private IUsingOperation CreateBoundUsingStatementOperation(BoundUsingStatement boundUsingStatement)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Expected O, but got Unknown
IOperation? obj = Create((BoundNode?)(((object)boundUsingStatement.DeclarationsOpt) ?? ((object)boundUsingStatement.ExpressionOpt)));
IOperation val = Create(boundUsingStatement.Body);
ImmutableArray<ILocalSymbol> publicSymbols = boundUsingStatement.Locals.GetPublicSymbols();
bool flag = boundUsingStatement.AwaitOpt != null;
DisposeOperationInfo val2 = (((object)boundUsingStatement.PatternDisposeInfoOpt != null) ? new DisposeOperationInfo(boundUsingStatement.PatternDisposeInfoOpt.Method.GetPublicSymbol(), CreateDisposeArguments(boundUsingStatement.PatternDisposeInfoOpt, boundUsingStatement.Syntax)) : default(DisposeOperationInfo));
SyntaxNode syntax = boundUsingStatement.Syntax;
bool wasCompilerGenerated = boundUsingStatement.WasCompilerGenerated;
return (IUsingOperation)new UsingOperation(obj, val, publicSymbols, flag, val2, _semanticModel, syntax, wasCompilerGenerated);
}
private IThrowOperation CreateBoundThrowStatementOperation(BoundThrowStatement boundThrowStatement)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
IOperation? obj = Create(boundThrowStatement.ExpressionOpt);
SyntaxNode syntax = boundThrowStatement.Syntax;
ITypeSymbol val = null;
bool wasCompilerGenerated = boundThrowStatement.WasCompilerGenerated;
return (IThrowOperation)new ThrowOperation(obj, _semanticModel, syntax, val, wasCompilerGenerated);
}
private IReturnOperation CreateBoundReturnStatementOperation(BoundReturnStatement boundReturnStatement)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
IOperation? obj = Create(boundReturnStatement.ExpressionOpt);
SyntaxNode syntax = boundReturnStatement.Syntax;
bool wasCompilerGenerated = boundReturnStatement.WasCompilerGenerated;
return (IReturnOperation)new ReturnOperation(obj, (OperationKind)9, _semanticModel, syntax, wasCompilerGenerated);
}
private IReturnOperation CreateBoundYieldReturnStatementOperation(BoundYieldReturnStatement boundYieldReturnStatement)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
IOperation? obj = Create(boundYieldReturnStatement.Expression);
SyntaxNode syntax = boundYieldReturnStatement.Syntax;
bool wasCompilerGenerated = boundYieldReturnStatement.WasCompilerGenerated;
return (IReturnOperation)new ReturnOperation(obj, (OperationKind)14, _semanticModel, syntax, wasCompilerGenerated);
}
private ILockOperation CreateBoundLockStatementOperation(BoundLockStatement boundLockStatement)
{
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Expected O, but got Unknown
object obj;
if (_semanticModel.Compilation.CommonGetWellKnownTypeMember((WellKnownMember)143) != null)
{
ISymbol enclosingSymbol = _semanticModel.GetEnclosingSymbol(boundLockStatement.Syntax.SpanStart, default(CancellationToken));
obj = new SynthesizedLocal(((IMethodSymbol?)(object)((enclosingSymbol is IMethodSymbol) ? enclosingSymbol : null)).GetSymbol(), TypeWithAnnotations.Create(((CSharpCompilation)(object)_semanticModel.Compilation).GetSpecialType((SpecialType)7)), (SynthesizedLocalKind)2, boundLockStatement.Argument.Syntax, isPinned: false, isKnownToReferToTempIfReferenceType: false, (RefKind)0).GetPublicSymbol();
}
else
{
obj = null;
}
ILocalSymbol val = (ILocalSymbol)obj;
IOperation? obj2 = Create(boundLockStatement.Argument);
IOperation val2 = Create(boundLockStatement.Body);
SyntaxNode syntax = boundLockStatement.Syntax;
bool wasCompilerGenerated = boundLockStatement.WasCompilerGenerated;
return (ILockOperation)new LockOperation(obj2, val2, val, _semanticModel, syntax, wasCompilerGenerated);
}
private IInvalidOperation CreateBoundBadStatementOperation(BoundBadStatement boundBadStatement)
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Expected O, but got Unknown
SyntaxNode syntax = boundBadStatement.Syntax;
bool flag = boundBadStatement.WasCompilerGenerated || ImmutableArrayExtensions.Any<BoundNode, BoundBadStatement>(boundBadStatement.ChildBoundNodes, (Func<BoundNode, BoundBadStatement, bool>)((BoundNode e, BoundBadStatement boundBadStatement2) => e?.Syntax == boundBadStatement2.Syntax), boundBadStatement);
return (IInvalidOperation)new InvalidOperation(this.CreateFromArray<BoundNode, IOperation>(boundBadStatement.ChildBoundNodes), _semanticModel, syntax, (ITypeSymbol)null, (ConstantValue)null, flag);
}
private IOperation CreateBoundLocalDeclarationOperation(BoundLocalDeclaration boundLocalDeclaration)
{
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Expected O, but got Unknown
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Expected O, but got Unknown
SyntaxNode syntax = boundLocalDeclaration.Syntax;
SyntaxNode val2;
SyntaxNode val;
switch (syntax.Kind())
{
case SyntaxKind.LocalDeclarationStatement:
val2 = (SyntaxNode)(object)((LocalDeclarationStatementSyntax)(object)(val = (SyntaxNode)(object)(LocalDeclarationStatementSyntax)(object)syntax)).Declaration;
break;
case SyntaxKind.VariableDeclarator:
val = syntax.Parent;
val2 = syntax.Parent;
break;
default:
val = (val2 = syntax);
break;
}
bool wasCompilerGenerated = boundLocalDeclaration.WasCompilerGenerated;
ImmutableArray<IVariableDeclaratorOperation> immutableArray = CreateVariableDeclarator(boundLocalDeclaration, val2);
ImmutableArray<IOperation> immutableArray2 = CreateIgnoredDimensions(boundLocalDeclaration);
VariableDeclarationOperation val3 = new VariableDeclarationOperation(immutableArray, (IVariableInitializerOperation)null, immutableArray2, _semanticModel, val2, wasCompilerGenerated);
bool flag = val == val2 || boundLocalDeclaration.WasCompilerGenerated;
return (IOperation)new VariableDeclarationGroupOperation(ImmutableArray.Create<IVariableDeclarationOperation>((IVariableDeclarationOperation)val3), _semanticModel, val, flag);
}
private IOperation CreateBoundMultipleLocalDeclarationsBaseOperation(BoundMultipleLocalDeclarationsBase boundMultipleLocalDeclarations)
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Expected O, but got Unknown
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Expected O, but got Unknown
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
SyntaxNode syntax = boundMultipleLocalDeclarations.Syntax;
SyntaxNode val = (SyntaxNode)(object)(syntax.IsKind(SyntaxKind.LocalDeclarationStatement) ? ((LocalDeclarationStatementSyntax)(object)syntax).Declaration : ((VariableDeclarationSyntax)(object)syntax));
bool wasCompilerGenerated = boundMultipleLocalDeclarations.WasCompilerGenerated;
ImmutableArray<IVariableDeclaratorOperation> immutableArray = CreateVariableDeclarator(boundMultipleLocalDeclarations, val);
ImmutableArray<IOperation> immutableArray2 = CreateIgnoredDimensions(boundMultipleLocalDeclarations);
VariableDeclarationOperation val2 = new VariableDeclarationOperation(immutableArray, (IVariableInitializerOperation)null, immutableArray2, _semanticModel, val, wasCompilerGenerated);
bool flag = syntax == val || boundMultipleLocalDeclarations.WasCompilerGenerated || boundMultipleLocalDeclarations is BoundUsingLocalDeclarations;
VariableDeclarationGroupOperation val3 = new VariableDeclarationGroupOperation(ImmutableArray.Create<IVariableDeclarationOperation>((IVariableDeclarationOperation)val2), _semanticModel, syntax, flag);
if (boundMultipleLocalDeclarations is BoundUsingLocalDeclarations boundUsingLocalDeclarations)
{
return (IOperation)new UsingDeclarationOperation((IVariableDeclarationGroupOperation)(object)val3, boundUsingLocalDeclarations.AwaitOpt != null, ((object)boundUsingLocalDeclarations.PatternDisposeInfoOpt != null) ? new DisposeOperationInfo(boundUsingLocalDeclarations.PatternDisposeInfoOpt.Method.GetPublicSymbol(), CreateDisposeArguments(boundUsingLocalDeclarations.PatternDisposeInfoOpt, boundUsingLocalDeclarations.Syntax)) : default(DisposeOperationInfo), _semanticModel, syntax, boundMultipleLocalDeclarations.WasCompilerGenerated);
}
return (IOperation)(object)val3;
}
private ILabeledOperation CreateBoundLabelStatementOperation(BoundLabelStatement boundLabelStatement)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
ILabelSymbol? publicSymbol = boundLabelStatement.Label.GetPublicSymbol();
SyntaxNode syntax = boundLabelStatement.Syntax;
bool wasCompilerGenerated = boundLabelStatement.WasCompilerGenerated;
return (ILabeledOperation)new LabeledOperation(publicSymbol, (IOperation)null, _semanticModel, syntax, wasCompilerGenerated);
}
private ILabeledOperation CreateBoundLabeledStatementOperation(BoundLabeledStatement boundLabeledStatement)
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
ILabelSymbol? publicSymbol = boundLabeledStatement.Label.GetPublicSymbol();
IOperation val = Create(boundLabeledStatement.Body);
SyntaxNode syntax = boundLabeledStatement.Syntax;
bool wasCompilerGenerated = boundLabeledStatement.WasCompilerGenerated;
return (ILabeledOperation)new LabeledOperation(publicSymbol, val, _semanticModel, syntax, wasCompilerGenerated);
}
private IExpressionStatementOperation CreateBoundExpressionStatementOperation(BoundExpressionStatement boundExpressionStatement)
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
bool flag = boundExpressionStatement.WasCompilerGenerated || boundExpressionStatement.Syntax == boundExpressionStatement.Expression.Syntax;
SyntaxNode syntax = boundExpressionStatement.Syntax;
IOperation? obj = Create(boundExpressionStatement.Expression);
if (boundExpressionStatement.Expression is BoundSequence)
{
flag = true;
}
return (IExpressionStatementOperation)new ExpressionStatementOperation(obj, _semanticModel, syntax, flag);
}
internal IOperation CreateBoundTupleOperation(BoundTupleExpression boundTupleExpression, bool createDeclaration = true)
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Expected O, but got Unknown
SyntaxNode val = boundTupleExpression.Syntax;
bool wasCompilerGenerated = boundTupleExpression.WasCompilerGenerated;
ITypeSymbol publicTypeSymbol = boundTupleExpression.GetPublicTypeSymbol();
if (val is DeclarationExpressionSyntax declarationExpressionSyntax)
{
val = (SyntaxNode)(object)declarationExpressionSyntax.Designation;
if (createDeclaration)
{
return (IOperation)new DeclarationExpressionOperation(CreateBoundTupleOperation(boundTupleExpression, createDeclaration: false), _semanticModel, (SyntaxNode)(object)declarationExpressionSyntax, publicTypeSymbol, false);
}
}
TypeSymbol typeSymbol = default(TypeSymbol);
if (boundTupleExpression is BoundTupleLiteral boundTupleLiteral)
{
TypeSymbol type = boundTupleLiteral.Type;
typeSymbol = type;
}
else if (boundTupleExpression is BoundConvertedTupleLiteral boundConvertedTupleLiteral)
{
BoundTupleLiteral sourceTuple = boundConvertedTupleLiteral.SourceTuple;
if (sourceTuple != null)
{
TypeSymbol type2 = sourceTuple.Type;
typeSymbol = type2;
}
else
{
typeSymbol = null;
}
}
else
{
if (boundTupleExpression != null)
{
BoundKind kind = boundTupleExpression.Kind;
throw ExceptionUtilities.UnexpectedValue((object)kind);
}
global::_003CPrivateImplementationDetails_003E.ThrowInvalidOperationException();
}
TypeSymbol symbol = typeSymbol;
return (IOperation)new TupleOperation(this.CreateFromArray<BoundExpression, IOperation>(boundTupleExpression.Arguments), symbol.GetPublicSymbol(), _semanticModel, val, publicTypeSymbol, wasCompilerGenerated);
}
private IInterpolatedStringOperation CreateBoundInterpolatedStringExpressionOperation(BoundInterpolatedString boundInterpolatedString, ImmutableArray<(bool IsLiteral, bool HasAlignment, bool HasFormat)>? positionInfo = null)
{
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Expected O, but got Unknown
ImmutableArray<IInterpolatedStringContentOperation> immutableArray = CreateBoundInterpolatedStringContentOperation(boundInterpolatedString.Parts, positionInfo ?? boundInterpolatedString.InterpolationData?.PositionInfo[0]);
SyntaxNode syntax = boundInterpolatedString.Syntax;
ITypeSymbol publicTypeSymbol = boundInterpolatedString.GetPublicTypeSymbol();
ConstantValue constantValueOpt = boundInterpolatedString.ConstantValueOpt;
bool wasCompilerGenerated = boundInterpolatedString.WasCompilerGenerated;
return (IInterpolatedStringOperation)new InterpolatedStringOperation(immutableArray, _semanticModel, syntax, publicTypeSymbol, constantValueOpt, wasCompilerGenerated);
}
internal ImmutableArray<IInterpolatedStringContentOperation> CreateBoundInterpolatedStringContentOperation(ImmutableArray<BoundExpression> parts, ImmutableArray<(bool IsLiteral, bool HasAlignment, bool HasFormat)>? positionInfo)
{
if (positionInfo.HasValue)
{
ImmutableArray<(bool, bool, bool)> valueOrDefault = positionInfo.GetValueOrDefault();
return createHandlerInterpolatedStringContent(valueOrDefault);
}
return createNonHandlerInterpolatedStringContent();
ImmutableArray<IInterpolatedStringContentOperation> createHandlerInterpolatedStringContent(ImmutableArray<(bool IsLiteral, bool HasAlignment, bool HasFormat)> immutableArray)
{
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_01ec: Expected O, but got Unknown
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Expected O, but got Unknown
ArrayBuilder<IInterpolatedStringContentOperation> instance = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length);
for (int i = 0; i < parts.Length; i++)
{
BoundExpression boundExpression = parts[i];
(bool, bool, bool) currentPosition = immutableArray[i];
BoundExpression boundExpression2;
BoundExpression boundNode;
BoundExpression boundNode2;
if (boundExpression is BoundCall boundCall)
{
(boundExpression2, boundNode, boundNode2) = getCallInfo(boundCall.Arguments, boundCall.ArgumentNamesOpt, currentPosition);
}
else if (boundExpression is BoundDynamicInvocation boundDynamicInvocation)
{
(boundExpression2, boundNode, boundNode2) = getCallInfo(boundDynamicInvocation.Arguments, boundDynamicInvocation.ArgumentNamesOpt, currentPosition);
}
else
{
if (!(boundExpression is BoundBadExpression boundBadExpression))
{
throw ExceptionUtilities.UnexpectedValue((object)boundExpression.Kind);
}
boundExpression2 = boundBadExpression.ChildBoundNodes[0];
if (currentPosition.Item1)
{
boundNode = (boundNode2 = null);
}
else
{
boundNode = (currentPosition.Item2 ? boundBadExpression.ChildBoundNodes[1] : null);
object obj;
if (!currentPosition.Item3)
{
obj = null;
}
else
{
ImmutableArray<BoundExpression> childBoundNodes = boundBadExpression.ChildBoundNodes;
obj = childBoundNodes[childBoundNodes.Length - 2];
}
boundNode2 = (BoundExpression)obj;
}
}
bool flag = false;
if (currentPosition.Item1)
{
IOperation val;
if (!(boundExpression2 is BoundLiteral boundLiteral))
{
if (!(boundExpression2 is BoundConversion boundConversion) || !(boundConversion.Operand is BoundLiteral))
{
throw ExceptionUtilities.UnexpectedValue((object)boundExpression2.Kind);
}
val = CreateBoundConversionOperation(boundConversion, forceOperandImplicitLiteral: true);
}
else
{
val = (IOperation)(object)CreateBoundLiteralOperation(boundLiteral, @implicit: true);
}
IOperation val2 = val;
instance.Add((IInterpolatedStringContentOperation)new InterpolatedStringTextOperation(val2, _semanticModel, boundExpression.Syntax, flag));
}
else
{
IOperation val3 = Create(boundExpression2);
IOperation val4 = Create(boundNode);
IOperation val5 = Create(boundNode2);
instance.Add((IInterpolatedStringContentOperation)new InterpolationOperation(val3, val4, val5, _semanticModel, boundExpression.Syntax, flag));
}
}
return instance.ToImmutableAndFree();
}
ImmutableArray<IInterpolatedStringContentOperation> createNonHandlerInterpolatedStringContent()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
ArrayBuilder<IInterpolatedStringContentOperation> instance = ArrayBuilder<IInterpolatedStringContentOperation>.GetInstance(parts.Length);
ImmutableArray<BoundExpression>.Enumerator enumerator = parts.GetEnumerator();
while (enumerator.MoveNext())
{
BoundExpression current = enumerator.Current;
if (current.Kind == BoundKind.StringInsert)
{
instance.Add((IInterpolatedStringContentOperation)Create(current));
}
else
{
instance.Add((IInterpolatedStringContentOperation)(object)CreateBoundInterpolatedStringTextOperation((BoundLiteral)current));
}
}
return instance.ToImmutableAndFree();
}
static (BoundExpression Value, BoundExpression? Alignment, BoundExpression? Format) getCallInfo(ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, (bool IsLiteral, bool HasAlignment, bool HasFormat) currentPosition)
{
BoundExpression item = arguments[0];
if (currentPosition.IsLiteral || argumentNamesOpt.IsDefault)
{
return (Value: item, Alignment: null, Format: null);
}
int num = argumentNamesOpt.IndexOf("alignment");
BoundExpression item2 = ((num == -1) ? null : arguments[num]);
int num2 = argumentNamesOpt.IndexOf("format");
BoundExpression item3 = ((num2 == -1) ? null : arguments[num2]);
return (Value: item, Alignment: item2, Format: item3);
}
}
private IInterpolationOperation CreateBoundInterpolationOperation(BoundStringInsert boundStringInsert)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Expected O, but got Unknown
IOperation? obj = Create(boundStringInsert.Value);
IOperation val = Create(boundStringInsert.Alignment);
IOperation val2 = Create(boundStringInsert.Format);
SyntaxNode syntax = boundStringInsert.Syntax;
bool wasCompilerGenerated = boundStringInsert.WasCompilerGenerated;
return (IInterpolationOperation)new InterpolationOperation(obj, val, val2, _semanticModel, syntax, wasCompilerGenerated);
}
private IInterpolatedStringTextOperation CreateBoundInterpolatedStringTextOperation(BoundLiteral boundNode)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
ILiteralOperation obj = CreateBoundLiteralOperation(boundNode, @implicit: true);
SyntaxNode syntax = boundNode.Syntax;
bool wasCompilerGenerated = boundNode.WasCompilerGenerated;
return (IInterpolatedStringTextOperation)new InterpolatedStringTextOperation((IOperation)(object)obj, _semanticModel, syntax, wasCompilerGenerated);
}
private IInterpolatedStringHandlerCreationOperation CreateInterpolatedStringHandler(BoundConversion conversion)
{
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
InterpolatedStringHandlerData interpolatedStringHandlerData = conversion.Operand.GetInterpolatedStringHandlerData();
IOperation? obj = Create(interpolatedStringHandlerData.Construction);
IOperation val = createContent(conversion.Operand);
bool flag = conversion.WasCompilerGenerated || !conversion.ExplicitCastInCode;
return (IInterpolatedStringHandlerCreationOperation)new InterpolatedStringHandlerCreationOperation(obj, interpolatedStringHandlerData.HasTrailingHandlerValidityParameter, interpolatedStringHandlerData.UsesBoolReturns, val, _semanticModel, conversion.Syntax, conversion.GetPublicTypeSymbol(), flag);
IOperation createContent(BoundExpression current)
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Expected O, but got Unknown
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
if (current is BoundBinaryOperator boundBinaryOperator)
{
IOperation obj2 = createContent(boundBinaryOperator.Left);
IOperation val2 = createContent(boundBinaryOperator.Right);
return (IOperation)new InterpolatedStringAdditionOperation(obj2, val2, _semanticModel, current.Syntax, current.WasCompilerGenerated);
}
if (current is BoundInterpolatedString boundInterpolatedString)
{
return (IOperation)new InterpolatedStringOperation(ImmutableArrayExtensions.SelectAsArray<BoundExpression, CSharpOperationFactory, IInterpolatedStringContentOperation>(boundInterpolatedString.Parts, (Func<BoundExpression, CSharpOperationFactory, IInterpolatedStringContentOperation>)delegate(BoundExpression part, CSharpOperationFactory @this)
{
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
string text;
if (part is BoundCall boundCall)
{
MethodSymbol method = boundCall.Method;
if ((object)method != null)
{
string name = method.Name;
text = name;
goto IL_007c;
}
}
else if (part is BoundDynamicInvocation boundDynamicInvocation)
{
if (boundDynamicInvocation.Expression is BoundMethodGroup boundMethodGroup)
{
string name2 = boundMethodGroup.Name;
text = name2;
goto IL_007c;
}
}
else if (part == null)
{
goto IL_006b;
}
if (!part.HasErrors)
{
goto IL_006b;
}
text = "";
goto IL_007c;
IL_006b:
throw ExceptionUtilities.UnexpectedValue((object)part.Kind);
IL_007c:
string text2 = text;
OperationKind val3;
if (text2 == null || text2.Length != 0)
{
if (!(text2 == "AppendLiteral"))
{
if (!(text2 == "AppendFormatted"))
{
throw ExceptionUtilities.UnexpectedValue((object)text2);
}
val3 = (OperationKind)117;
}
else
{
val3 = (OperationKind)116;
}
}
else
{
val3 = (OperationKind)118;
}
OperationKind val4 = val3;
return (IInterpolatedStringContentOperation)new InterpolatedStringAppendOperation(@this.Create(part), val4, @this._semanticModel, part.Syntax, true);
}, this), _semanticModel, boundInterpolatedString.Syntax, boundInterpolatedString.GetPublicTypeSymbol(), boundInterpolatedString.ConstantValueOpt, boundInterpolatedString.WasCompilerGenerated);
}
throw ExceptionUtilities.UnexpectedValue((object)current.Kind);
}
}
private IOperation CreateBoundInterpolatedStringArgumentPlaceholder(BoundInterpolatedStringArgumentPlaceholder placeholder)
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Expected O, but got Unknown
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
SyntaxNode syntax = placeholder.Syntax;
bool flag = true;
ITypeSymbol publicTypeSymbol = placeholder.GetPublicTypeSymbol();
if (placeholder.ArgumentIndex != -3)
{
int argumentIndex = placeholder.ArgumentIndex;
(InterpolatedStringArgumentPlaceholderKind, int) tuple = ((argumentIndex >= 0) ? ((InterpolatedStringArgumentPlaceholderKind)0, argumentIndex) : (argumentIndex switch
{
-1 => ((InterpolatedStringArgumentPlaceholderKind)1, -1),
-2 => ((InterpolatedStringArgumentPlaceholderKind)2, -1),
_ => throw ExceptionUtilities.UnexpectedValue((object)placeholder.ArgumentIndex),
}));
(InterpolatedStringArgumentPlaceholderKind, int) tuple2 = tuple;
var (val, _) = tuple2;
return (IOperation)new InterpolatedStringHandlerArgumentPlaceholderOperation(tuple2.Item2, val, _semanticModel, syntax, flag);
}
return (IOperation)new InvalidOperation(ImmutableArray<IOperation>.Empty, _semanticModel, syntax, publicTypeSymbol, placeholder.ConstantValueOpt, flag);
}
private IOperation CreateBoundInterpolatedStringHandlerPlaceholder(BoundInterpolatedStringHandlerPlaceholder placeholder)
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Expected O, but got Unknown
return (IOperation)new InstanceReferenceOperation((InstanceReferenceKind)3, _semanticModel, placeholder.Syntax, placeholder.GetPublicTypeSymbol(), placeholder.WasCompilerGenerated);
}
private IConstantPatternOperation CreateBoundConstantPatternOperation(BoundConstantPattern boundConstantPattern)
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Expected O, but got Unknown
IOperation? obj = Create(boundConstantPattern.Value);
SyntaxNode syntax = boundConstantPattern.Syntax;
bool wasCompilerGenerated = boundConstantPattern.WasCompilerGenerated;
TypeSymbol inputType = boundConstantPattern.InputType;
TypeSymbol narrowedType = boundConstantPattern.NarrowedType;
return (IConstantPatternOperation)new ConstantPatternOperation(obj, inputType.GetPublicSymbol(), narrowedType.GetPublicSymbol(), _semanticModel, syntax, wasCompilerGenerated);
}
private IOperation CreateBoundRelationalPatternOperation(BoundRelationalPattern boundRelationalPattern)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
BinaryOperatorKind val = Helper.DeriveBinaryOperatorKind(boundRelationalPattern.Relation);
IOperation val2 = Create(boundRelationalPattern.Value);
SyntaxNode syntax = boundRelationalPattern.Syntax;
bool wasCompilerGenerated = boundRelationalPattern.WasCompilerGenerated;
TypeSymbol inputType = boundRelationalPattern.InputType;
TypeSymbol narrowedType = boundRelationalPattern.NarrowedType;
return (IOperation)new RelationalPatternOperation(val, val2, inputType.GetPublicSymbol(), narrowedType.GetPublicSymbol(), _semanticModel, syntax, wasCompilerGenerated);
}
private IDeclarationPatternOperation CreateBoundDeclarationPatternOperation(BoundDeclarationPattern boundDeclarationPattern)
{
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Expected O, but got Unknown
ISymbol publicSymbol = boundDeclarationPattern.Variable.GetPublicSymbol();
if (publicSymbol == null)
{
BoundExpression? variableAccess = boundDeclarationPattern.VariableAccess;
if (variableAccess != null && variableAccess.Kind == BoundKind.DiscardExpression)
{
publicSymbol = ((BoundDiscardExpression)boundDeclarationPattern.VariableAccess).ExpressionSymbol.GetPublicSymbol();
}
}
ITypeSymbol publicSymbol2 = boundDeclarationPattern.InputType.GetPublicSymbol();
ITypeSymbol publicSymbol3 = boundDeclarationPattern.NarrowedType.GetPublicSymbol();
bool isVar = boundDeclarationPattern.IsVar;
ITypeSymbol? obj = (isVar ? null : boundDeclarationPattern.DeclaredType.GetPublicTypeSymbol());
SyntaxNode syntax = boundDeclarationPattern.Syntax;
bool wasCompilerGenerated = boundDeclarationPattern.WasCompilerGenerated;
return (IDeclarationPatternOperation)new DeclarationPatternOperation(obj, isVar, publicSymbol, publicSymbol2, publicSymbol3, _semanticModel, syntax, wasCompilerGenerated);
}
private IRecursivePatternOperation CreateBoundRecursivePatternOperation(BoundRecursivePattern boundRecursivePattern)
{
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Expected O, but got Unknown
ITypeSymbol publicSymbol = (boundRecursivePattern.DeclaredType?.Type ?? boundRecursivePattern.InputType.StrippedType()).GetPublicSymbol();
ImmutableArray<BoundPositionalSubpattern> deconstruction = boundRecursivePattern.Deconstruction;
ImmutableArray<IPatternOperation> immutableArray = ((!deconstruction.IsDefault) ? ImmutableArrayExtensions.SelectAsArray<BoundPositionalSubpattern, CSharpOperationFactory, IPatternOperation>(deconstruction, (Func<BoundPositionalSubpattern, CSharpOperationFactory, IPatternOperation>)((BoundPositionalSubpattern p, CSharpOperationFactory fac) => (IPatternOperation)fac.Create(p.Pattern)), this) : ImmutableArray<IPatternOperation>.Empty);
ImmutableArray<BoundPropertySubpattern> properties = boundRecursivePattern.Properties;
ImmutableArray<IPropertySubpatternOperation> immutableArray2 = ((!properties.IsDefault) ? ImmutableArrayExtensions.SelectAsArray<BoundPropertySubpattern, (CSharpOperationFactory, ITypeSymbol), IPropertySubpatternOperation>(properties, (Func<BoundPropertySubpattern, (CSharpOperationFactory, ITypeSymbol), IPropertySubpatternOperation>)((BoundPropertySubpattern p, (CSharpOperationFactory Fac, ITypeSymbol MatchedType) arg) => arg.Fac.CreatePropertySubpattern(p, arg.MatchedType)), (this, publicSymbol)) : ImmutableArray<IPropertySubpatternOperation>.Empty);
return (IRecursivePatternOperation)new RecursivePatternOperation(publicSymbol, (ISymbol)(object)boundRecursivePattern.DeconstructMethod.GetPublicSymbol(), immutableArray, immutableArray2, boundRecursivePattern.Variable.GetPublicSymbol(), boundRecursivePattern.InputType.GetPublicSymbol(), boundRecursivePattern.NarrowedType.GetPublicSymbol(), _semanticModel, boundRecursivePattern.Syntax, boundRecursivePattern.WasCompilerGenerated);
}
private IRecursivePatternOperation CreateBoundRecursivePatternOperation(BoundITuplePattern boundITuplePattern)
{
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Expected O, but got Unknown
ImmutableArray<BoundPositionalSubpattern> subpatterns = boundITuplePattern.Subpatterns;
ImmutableArray<IPatternOperation> immutableArray = ((!subpatterns.IsDefault) ? ImmutableArrayExtensions.SelectAsArray<BoundPositionalSubpattern, CSharpOperationFactory, IPatternOperation>(subpatterns, (Func<BoundPositionalSubpattern, CSharpOperationFactory, IPatternOperation>)((BoundPositionalSubpattern p, CSharpOperationFactory fac) => (IPatternOperation)fac.Create(p.Pattern)), this) : ImmutableArray<IPatternOperation>.Empty);
return (IRecursivePatternOperation)new RecursivePatternOperation(boundITuplePattern.InputType.StrippedType().GetPublicSymbol(), (ISymbol)(object)boundITuplePattern.GetLengthMethod.ContainingType.GetPublicSymbol(), immutableArray, ImmutableArray<IPropertySubpatternOperation>.Empty, (ISymbol)null, boundITuplePattern.InputType.GetPublicSymbol(), boundITuplePattern.NarrowedType.GetPublicSymbol(), _semanticModel, boundITuplePattern.Syntax, boundITuplePattern.WasCompilerGenerated);
}
private IOperation CreateBoundTypePatternOperation(BoundTypePattern boundTypePattern)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
return (IOperation)new TypePatternOperation(boundTypePattern.NarrowedType.GetPublicSymbol(), boundTypePattern.InputType.GetPublicSymbol(), boundTypePattern.NarrowedType.GetPublicSymbol(), _semanticModel, boundTypePattern.Syntax, boundTypePattern.WasCompilerGenerated);
}
private IOperation CreateBoundSlicePatternOperation(BoundSlicePattern boundNode)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Expected O, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Expected O, but got Unknown
return (IOperation)new SlicePatternOperation((boundNode.Pattern == null) ? null : Binder.GetIndexerOrImplicitIndexerSymbol(boundNode.IndexerAccess).GetPublicSymbol(), (IPatternOperation)Create(boundNode.Pattern), boundNode.InputType.GetPublicSymbol(), boundNode.NarrowedType.GetPublicSymbol(), _semanticModel, boundNode.Syntax, boundNode.WasCompilerGenerated);
}
private IOperation CreateBoundListPatternOperation(BoundListPattern boundNode)
{
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Expected O, but got Unknown
BoundExpression receiver;
SyntaxNode propertySyntax;
return (IOperation)new ListPatternOperation((ISymbol)(object)Binder.GetPropertySymbol(boundNode.LengthAccess, out receiver, out propertySyntax).GetPublicSymbol(), Binder.GetIndexerOrImplicitIndexerSymbol(boundNode.IndexerAccess).GetPublicSymbol(), ImmutableArrayExtensions.SelectAsArray<BoundPattern, CSharpOperationFactory, IPatternOperation>(boundNode.Subpatterns, (Func<BoundPattern, CSharpOperationFactory, IPatternOperation>)((BoundPattern p, CSharpOperationFactory fac) => (IPatternOperation)fac.Create(p)), this), boundNode.Variable.GetPublicSymbol(), boundNode.InputType.GetPublicSymbol(), boundNode.NarrowedType.GetPublicSymbol(), _semanticModel, boundNode.Syntax, boundNode.WasCompilerGenerated);
}
private IOperation CreateBoundNegatedPatternOperation(BoundNegatedPattern boundNegatedPattern)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Expected O, but got Unknown
return (IOperation)new NegatedPatternOperation((IPatternOperation)Create(boundNegatedPattern.Negated), boundNegatedPattern.InputType.GetPublicSymbol(), boundNegatedPattern.NarrowedType.GetPublicSymbol(), _semanticModel, boundNegatedPattern.Syntax, boundNegatedPattern.WasCompilerGenerated);
}
private IOperation CreateBoundBinaryPatternOperation(BoundBinaryPattern boundBinaryPattern)
{
//IL_001a: 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_005d: Expected O, but got Unknown
//IL_005d: Expected O, but got Unknown
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
return (IOperation)new BinaryPatternOperation((BinaryOperatorKind)(boundBinaryPattern.Disjunction ? 11 : 10), (IPatternOperation)Create(boundBinaryPattern.Left), (IPatternOperation)Create(boundBinaryPattern.Right), boundBinaryPattern.InputType.GetPublicSymbol(), boundBinaryPattern.NarrowedType.GetPublicSymbol(), _semanticModel, boundBinaryPattern.Syntax, boundBinaryPattern.WasCompilerGenerated);
}
private ISwitchOperation CreateBoundSwitchStatementOperation(BoundSwitchStatement boundSwitchStatement)
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected O, but got Unknown
IOperation val = Create(boundSwitchStatement.Expression);
ImmutableArray<ISwitchCaseOperation> immutableArray = this.CreateFromArray<BoundSwitchSection, ISwitchCaseOperation>(boundSwitchStatement.SwitchSections);
ImmutableArray<ILocalSymbol> publicSymbols = boundSwitchStatement.InnerLocals.GetPublicSymbols();
ILabelSymbol publicSymbol = boundSwitchStatement.BreakLabel.GetPublicSymbol();
SyntaxNode syntax = boundSwitchStatement.Syntax;
bool wasCompilerGenerated = boundSwitchStatement.WasCompilerGenerated;
return (ISwitchOperation)new SwitchOperation(publicSymbols, val, immutableArray, publicSymbol, _semanticModel, syntax, wasCompilerGenerated);
}
private ISwitchCaseOperation CreateBoundSwitchSectionOperation(BoundSwitchSection boundSwitchSection)
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
ImmutableArray<ICaseClauseOperation> immutableArray = this.CreateFromArray<BoundSwitchLabel, ICaseClauseOperation>(boundSwitchSection.SwitchLabels);
ImmutableArray<IOperation> immutableArray2 = this.CreateFromArray<BoundStatement, IOperation>(boundSwitchSection.Statements);
ImmutableArray<ILocalSymbol> publicSymbols = boundSwitchSection.Locals.GetPublicSymbols();
return (ISwitchCaseOperation)new SwitchCaseOperation(immutableArray, immutableArray2, publicSymbols, (IOperation)null, _semanticModel, boundSwitchSection.Syntax, boundSwitchSection.WasCompilerGenerated);
}
private ISwitchExpressionOperation CreateBoundSwitchExpressionOperation(BoundConvertedSwitchExpression boundSwitchExpression)
{
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
IOperation? obj = Create(boundSwitchExpression.Expression);
ImmutableArray<ISwitchExpressionArmOperation> immutableArray = this.CreateFromArray<BoundSwitchExpressionArm, ISwitchExpressionArmOperation>(boundSwitchExpression.SwitchArms);
bool flag = !(boundSwitchExpression.DefaultLabel != null);
return (ISwitchExpressionOperation)new SwitchExpressionOperation(obj, immutableArray, flag, _semanticModel, boundSwitchExpression.Syntax, boundSwitchExpression.GetPublicTypeSymbol(), boundSwitchExpression.WasCompilerGenerated);
}
private ISwitchExpressionArmOperation CreateBoundSwitchExpressionArmOperation(BoundSwitchExpressionArm boundSwitchExpressionArm)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
IPatternOperation val = (IPatternOperation)Create(boundSwitchExpressionArm.Pattern);
IOperation val2 = Create(boundSwitchExpressionArm.WhenClause);
IOperation val3 = Create(boundSwitchExpressionArm.Value);
return (ISwitchExpressionArmOperation)new SwitchExpressionArmOperation(val, val2, val3, boundSwitchExpressionArm.Locals.GetPublicSymbols(), _semanticModel, boundSwitchExpressionArm.Syntax, boundSwitchExpressionArm.WasCompilerGenerated);
}
private ICaseClauseOperation CreateBoundSwitchLabelOperation(BoundSwitchLabel boundSwitchLabel)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Expected O, but got Unknown
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Expected O, but got Unknown
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Expected O, but got Unknown
SyntaxNode syntax = boundSwitchLabel.Syntax;
bool wasCompilerGenerated = boundSwitchLabel.WasCompilerGenerated;
LabelSymbol label = boundSwitchLabel.Label;
if (boundSwitchLabel.Syntax.Kind() != SyntaxKind.DefaultSwitchLabel)
{
if (boundSwitchLabel.WhenClause == null && boundSwitchLabel.Pattern.Kind == BoundKind.ConstantPattern && boundSwitchLabel.Pattern is BoundConstantPattern boundConstantPattern && boundConstantPattern.InputType.IsValidV6SwitchGoverningType())
{
return (ICaseClauseOperation)new SingleValueCaseClauseOperation(Create(boundConstantPattern.Value), label.GetPublicSymbol(), _semanticModel, syntax, wasCompilerGenerated);
}
IPatternOperation val = (IPatternOperation)Create(boundSwitchLabel.Pattern);
IOperation val2 = Create(boundSwitchLabel.WhenClause);
return (ICaseClauseOperation)new PatternCaseClauseOperation(label.GetPublicSymbol(), val, val2, _semanticModel, syntax, wasCompilerGenerated);
}
return (ICaseClauseOperation)new DefaultCaseClauseOperation(label.GetPublicSymbol(), _semanticModel, syntax, wasCompilerGenerated);
}
private IIsPatternOperation CreateBoundIsPatternExpressionOperation(BoundIsPatternExpression boundIsPatternExpression)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
IOperation? obj = Create(boundIsPatternExpression.Expression);
IPatternOperation val = (IPatternOperation)Create(boundIsPatternExpression.Pattern);
SyntaxNode syntax = boundIsPatternExpression.Syntax;
ITypeSymbol publicTypeSymbol = boundIsPatternExpression.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundIsPatternExpression.WasCompilerGenerated;
return (IIsPatternOperation)new IsPatternOperation(obj, val, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundQueryClauseOperation(BoundQueryClause boundQueryClause)
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
if (boundQueryClause.Syntax.Kind() != SyntaxKind.QueryExpression)
{
return Create(boundQueryClause.Value);
}
IOperation? obj = Create(boundQueryClause.Value);
SyntaxNode syntax = boundQueryClause.Syntax;
ITypeSymbol publicTypeSymbol = boundQueryClause.GetPublicTypeSymbol();
bool wasCompilerGenerated = boundQueryClause.WasCompilerGenerated;
return (IOperation)new TranslatedQueryOperation(obj, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private IOperation CreateBoundRangeVariableOperation(BoundRangeVariable boundRangeVariable)
{
return Create(boundRangeVariable.Value);
}
private IOperation CreateBoundDiscardExpressionOperation(BoundDiscardExpression boundNode)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
return (IOperation)new DiscardOperation(((DiscardSymbol)boundNode.ExpressionSymbol).GetPublicSymbol(), _semanticModel, boundNode.Syntax, boundNode.GetPublicTypeSymbol(), boundNode.WasCompilerGenerated);
}
private IOperation CreateFromEndIndexExpressionOperation(BoundFromEndIndexExpression boundIndex)
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
return (IOperation)new UnaryOperation((UnaryOperatorKind)7, Create(boundIndex.Operand), boundIndex.Type.IsNullableType(), false, (IMethodSymbol)null, (ITypeSymbol)null, _semanticModel, boundIndex.Syntax, boundIndex.GetPublicTypeSymbol(), (ConstantValue)null, boundIndex.WasCompilerGenerated);
}
private IOperation CreateRangeExpressionOperation(BoundRangeExpression boundRange)
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Expected O, but got Unknown
IOperation? obj = Create(boundRange.LeftOperandOpt);
IOperation val = Create(boundRange.RightOperandOpt);
return (IOperation)new RangeOperation(obj, val, boundRange.Type.IsNullableType(), boundRange.MethodOpt.GetPublicSymbol(), _semanticModel, boundRange.Syntax, boundRange.GetPublicTypeSymbol(), boundRange.WasCompilerGenerated);
}
private IOperation CreateBoundDiscardPatternOperation(BoundDiscardPattern boundNode)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
return (IOperation)new DiscardPatternOperation(boundNode.InputType.GetPublicSymbol(), boundNode.NarrowedType.GetPublicSymbol(), _semanticModel, boundNode.Syntax, boundNode.WasCompilerGenerated);
}
internal IPropertySubpatternOperation CreatePropertySubpattern(BoundPropertySubpattern subpattern, ITypeSymbol matchedType)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Expected O, but got Unknown
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Expected O, but got Unknown
SyntaxNode subpatternSyntax = subpattern.Syntax;
BoundPropertySubpatternMember boundPropertySubpatternMember = subpattern.Member;
IPatternOperation val = (IPatternOperation)Create(subpattern.Pattern);
if (boundPropertySubpatternMember == null)
{
return (IPropertySubpatternOperation)new PropertySubpatternOperation((IOperation)(object)OperationFactory.CreateInvalidOperation(_semanticModel, subpatternSyntax, ImmutableArray<IOperation>.Empty, true), val, _semanticModel, subpatternSyntax, false);
}
SyntaxNode syntax = boundPropertySubpatternMember.Syntax;
ITypeSymbol val2 = getInputType(boundPropertySubpatternMember, matchedType);
IPropertySubpatternOperation val3 = createPropertySubpattern(boundPropertySubpatternMember.Symbol, val, val2, syntax, boundPropertySubpatternMember.Receiver == null);
while (boundPropertySubpatternMember.Receiver != null)
{
boundPropertySubpatternMember = boundPropertySubpatternMember.Receiver;
syntax = boundPropertySubpatternMember.Syntax;
ITypeSymbol val4 = val2;
val2 = getInputType(boundPropertySubpatternMember, matchedType);
IPatternOperation pattern = (IPatternOperation)new RecursivePatternOperation(val4, (ISymbol)null, ImmutableArray<IPatternOperation>.Empty, ImmutableArray.Create<IPropertySubpatternOperation>(val3), (ISymbol)null, val4, val4, _semanticModel, syntax, true);
val3 = createPropertySubpattern(boundPropertySubpatternMember.Symbol, pattern, val2, syntax, isSingle: false);
}
return val3;
IPropertySubpatternOperation createPropertySubpattern(Symbol? symbol, IPatternOperation val7, ITypeSymbol receiverType, SyntaxNode nameSyntax, bool isSingle)
{
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Expected O, but got Unknown
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Expected O, but got Unknown
IOperation val5;
if (!(symbol is FieldSymbol fieldSymbol))
{
val5 = (IOperation)((!(symbol is PropertySymbol propertySymbol)) ? ((object)OperationFactory.CreateInvalidOperation(_semanticModel, nameSyntax, ImmutableArray<IOperation>.Empty, false)) : ((object)new PropertyReferenceOperation(propertySymbol.GetPublicSymbol(), (ITypeSymbol)null, ImmutableArray<IArgumentOperation>.Empty, createReceiver(), _semanticModel, nameSyntax, propertySymbol.Type.GetPublicSymbol(), false)));
}
else
{
ConstantValue constantValue = fieldSymbol.GetConstantValue(ConstantFieldsInProgress.Empty, earlyDecodingWellKnownAttributes: false);
val5 = (IOperation)new FieldReferenceOperation(fieldSymbol.GetPublicSymbol(), false, createReceiver(), _semanticModel, nameSyntax, fieldSymbol.Type.GetPublicSymbol(), constantValue, false);
}
SyntaxNode val6 = (SyntaxNode)(isSingle ? ((object)subpatternSyntax) : ((object)nameSyntax));
return (IPropertySubpatternOperation)new PropertySubpatternOperation(val5, val7, _semanticModel, val6, !isSingle);
IOperation? createReceiver()
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
Symbol? symbol2 = symbol;
if ((object)symbol2 != null && !symbol2.IsStatic)
{
return (IOperation?)new InstanceReferenceOperation((InstanceReferenceKind)2, _semanticModel, nameSyntax, receiverType, true);
}
return null;
}
}
static ITypeSymbol getInputType(BoundPropertySubpatternMember member, ITypeSymbol val5)
{
return member.Receiver?.Type.StrippedType().GetPublicSymbol() ?? val5;
}
}
private IInstanceReferenceOperation CreateCollectionValuePlaceholderOperation(BoundObjectOrCollectionValuePlaceholder placeholder)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
SyntaxNode syntax = placeholder.Syntax;
ITypeSymbol publicTypeSymbol = placeholder.GetPublicTypeSymbol();
bool wasCompilerGenerated = placeholder.WasCompilerGenerated;
return (IInstanceReferenceOperation)new InstanceReferenceOperation((InstanceReferenceKind)1, _semanticModel, syntax, publicTypeSymbol, wasCompilerGenerated);
}
private ImmutableArray<IArgumentOperation> CreateDisposeArguments(MethodArgumentInfo patternDisposeInfo, SyntaxNode syntax)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
if (patternDisposeInfo.Method.ParameterCount == 0)
{
return ImmutableArray<IArgumentOperation>.Empty;
}
return Operation.SetParentOperation<IArgumentOperation>(DeriveArguments(patternDisposeInfo.Method, patternDisposeInfo.Arguments, patternDisposeInfo.ArgsToParamsOpt, patternDisposeInfo.DefaultArguments, patternDisposeInfo.Expanded, syntax), (IOperation)null);
}
internal ImmutableArray<BoundStatement> ToStatements(BoundStatement? statement)
{
if (statement == null)
{
return ImmutableArray<BoundStatement>.Empty;
}
if (statement.Kind == BoundKind.StatementList)
{
return ((BoundStatementList)statement).Statements;
}
return ImmutableArray.Create(statement);
}
private IInstanceReferenceOperation CreateImplicitReceiver(SyntaxNode syntax, TypeSymbol type)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Expected O, but got Unknown
return (IInstanceReferenceOperation)new InstanceReferenceOperation((InstanceReferenceKind)1, _semanticModel, syntax, type.GetPublicSymbol(), true);
}
internal IArgumentOperation CreateArgumentOperation(ArgumentKind kind, IParameterSymbol? parameter, BoundExpression expression)
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
IOperation val = Create(expression);
SyntaxNode syntax = expression.Syntax;
bool flag;
if (syntax != null)
{
SyntaxNode parent = syntax.Parent;
if (parent is ArgumentSyntax || parent is AttributeArgumentSyntax)
{
flag = true;
goto IL_0034;
}
}
flag = false;
goto IL_0034;
IL_0034:
bool flag2;
SyntaxNode val2;
if (!flag)
{
SyntaxNode syntax2 = val.Syntax;
flag2 = true;
val2 = syntax2;
}
else
{
SyntaxNode parent2 = expression.Syntax.Parent;
bool wasCompilerGenerated = expression.WasCompilerGenerated;
flag2 = wasCompilerGenerated;
val2 = parent2;
}
return (IArgumentOperation)new ArgumentOperation(kind, parameter, val, OperationFactory.IdentityConversion, OperationFactory.IdentityConversion, _semanticModel, val2, flag2);
}
internal IVariableInitializerOperation? CreateVariableDeclaratorInitializer(BoundLocalDeclaration boundLocalDeclaration, SyntaxNode syntax)
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
if (boundLocalDeclaration.InitializerOpt != null)
{
SyntaxNode val = null;
bool flag = false;
if (syntax is VariableDeclaratorSyntax variableDeclaratorSyntax)
{
val = (SyntaxNode)(object)variableDeclaratorSyntax.Initializer;
}
if (val == null)
{
val = boundLocalDeclaration.InitializerOpt.Syntax;
flag = true;
}
IOperation val2 = Create(boundLocalDeclaration.InitializerOpt);
return (IVariableInitializerOperation?)new VariableInitializerOperation(ImmutableArray<ILocalSymbol>.Empty, val2, _semanticModel, val, flag);
}
return null;
}
private IVariableDeclaratorOperation CreateVariableDeclaratorInternal(BoundLocalDeclaration boundLocalDeclaration, SyntaxNode syntax)
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
ILocalSymbol? publicSymbol = boundLocalDeclaration.LocalSymbol.GetPublicSymbol();
bool flag = false;
IVariableInitializerOperation val = CreateVariableDeclaratorInitializer(boundLocalDeclaration, syntax);
ImmutableArray<IOperation> immutableArray = this.CreateFromArray<BoundExpression, IOperation>(boundLocalDeclaration.ArgumentsOpt);
return (IVariableDeclaratorOperation)new VariableDeclaratorOperation(publicSymbol, val, immutableArray, _semanticModel, syntax, flag);
}
[return: NotNullIfNotNull("boundLocal")]
internal IVariableDeclaratorOperation? CreateVariableDeclarator(BoundLocal? boundLocal)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
if (boundLocal != null)
{
return (IVariableDeclaratorOperation?)new VariableDeclaratorOperation(boundLocal.LocalSymbol.GetPublicSymbol(), (IVariableInitializerOperation)null, ImmutableArray<IOperation>.Empty, _semanticModel, boundLocal.Syntax, false);
}
return null;
}
internal IOperation? CreateReceiverOperation(BoundNode? instance, Symbol? symbol)
{
if (instance == null || instance.Kind == BoundKind.TypeExpression)
{
return null;
}
if (symbol != null && symbol.IsStatic && instance.WasCompilerGenerated && instance.Kind == BoundKind.ThisReference)
{
return null;
}
return Create(instance);
}
private bool IsCallVirtual(MethodSymbol? targetMethod, BoundExpression? receiver)
{
if ((object)targetMethod != null && receiver != null && (targetMethod.IsVirtual || targetMethod.IsAbstract || targetMethod.IsOverride))
{
return !receiver.SuppressVirtualCalls;
}
return false;
}
private bool IsMethodInvalid(LookupResultKind resultKind, MethodSymbol targetMethod)
{
if (resultKind != LookupResultKind.OverloadResolutionFailure)
{
return targetMethod?.OriginalDefinition is ErrorMethodSymbol;
}
return true;
}
internal IEventReferenceOperation CreateBoundEventAccessOperation(BoundEventAssignmentOperator boundEventAssignmentOperator)
{
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Expected O, but got Unknown
SyntaxNode syntax = boundEventAssignmentOperator.Syntax;
IEventSymbol publicSymbol = boundEventAssignmentOperator.Event.GetPublicSymbol();
IOperation val = CreateReceiverOperation(boundEventAssignmentOperator.ReceiverOpt, boundEventAssignmentOperator.Event);
SyntaxNode left = (SyntaxNode)(object)((AssignmentExpressionSyntax)(object)syntax).Left;
bool wasCompilerGenerated = boundEventAssignmentOperator.WasCompilerGenerated;
TypeParameterSymbol constrainedToType = GetConstrainedToType(boundEventAssignmentOperator.Event, boundEventAssignmentOperator.ReceiverOpt);
return (IEventReferenceOperation)new EventReferenceOperation(publicSymbol, (ITypeSymbol)(object)constrainedToType.GetPublicSymbol(), val, _semanticModel, left, publicSymbol.Type, wasCompilerGenerated);
}
internal IOperation CreateDelegateTargetOperation(BoundNode delegateNode)
{
if (delegateNode is BoundConversion boundConversion)
{
if (boundConversion.ConversionKind == ConversionKind.MethodGroup)
{
return (IOperation)(object)CreateBoundMethodGroupSingleMethodOperation((BoundMethodGroup)boundConversion.Operand, boundConversion.SymbolOpt, boundConversion.SuppressVirtualCalls);
}
return Create(boundConversion.Operand);
}
BoundDelegateCreationExpression boundDelegateCreationExpression = (BoundDelegateCreationExpression)delegateNode;
if (boundDelegateCreationExpression.Argument.Kind == BoundKind.MethodGroup && boundDelegateCreationExpression.MethodOpt != null)
{
BoundMethodGroup boundMethodGroup = (BoundMethodGroup)boundDelegateCreationExpression.Argument;
return (IOperation)(object)CreateBoundMethodGroupSingleMethodOperation(boundMethodGroup, boundDelegateCreationExpression.MethodOpt, boundMethodGroup.SuppressVirtualCalls);
}
return Create(boundDelegateCreationExpression.Argument);
}
internal IOperation CreateMemberInitializerInitializedMember(BoundNode initializedMember)
{
if (!(initializedMember is BoundObjectInitializerMember boundObjectInitializerMember))
{
if (initializedMember is BoundDynamicObjectInitializerMember boundDynamicObjectInitializerMember)
{
return CreateBoundDynamicObjectInitializerMemberOperation(boundDynamicObjectInitializerMember);
}
return Create(initializedMember);
}
return CreateBoundObjectInitializerMemberOperation(boundObjectInitializerMember, isObjectOrCollectionInitializer: true);
}
internal ImmutableArray<IArgumentOperation> DeriveArguments(BoundNode containingExpression)
{
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
switch (containingExpression.Kind)
{
case BoundKind.ObjectInitializerMember:
{
BoundObjectInitializerMember boundObjectInitializerMember = (BoundObjectInitializerMember)containingExpression;
PropertySymbol methodOrIndexer = (PropertySymbol)boundObjectInitializerMember.MemberSymbol;
return DeriveArguments(methodOrIndexer, boundObjectInitializerMember.Arguments, boundObjectInitializerMember.ArgsToParamsOpt, boundObjectInitializerMember.DefaultArguments, boundObjectInitializerMember.Expanded, boundObjectInitializerMember.Syntax);
}
case BoundKind.IndexerAccess:
{
BoundIndexerAccess boundIndexerAccess = (BoundIndexerAccess)containingExpression;
return DeriveArguments(boundIndexerAccess.Indexer, boundIndexerAccess.Arguments, boundIndexerAccess.ArgsToParamsOpt, boundIndexerAccess.DefaultArguments, boundIndexerAccess.Expanded, boundIndexerAccess.Syntax);
}
case BoundKind.ObjectCreationExpression:
{
BoundObjectCreationExpression boundObjectCreationExpression = (BoundObjectCreationExpression)containingExpression;
return DeriveArguments(boundObjectCreationExpression.Constructor, boundObjectCreationExpression.Arguments, boundObjectCreationExpression.ArgsToParamsOpt, boundObjectCreationExpression.DefaultArguments, boundObjectCreationExpression.Expanded, boundObjectCreationExpression.Syntax);
}
case BoundKind.Attribute:
{
BoundAttribute boundAttribute = (BoundAttribute)containingExpression;
return DeriveArguments(boundAttribute.Constructor, boundAttribute.ConstructorArguments, boundAttribute.ConstructorArgumentsToParamsOpt, boundAttribute.ConstructorDefaultArguments, boundAttribute.ConstructorExpanded, boundAttribute.Syntax);
}
case BoundKind.Call:
{
BoundCall boundCall = (BoundCall)containingExpression;
return DeriveArguments(boundCall.Method, boundCall.Arguments, boundCall.ArgsToParamsOpt, boundCall.DefaultArguments, boundCall.Expanded, boundCall.Syntax, boundCall.InvokedAsExtensionMethod);
}
case BoundKind.CollectionElementInitializer:
{
BoundCollectionElementInitializer boundCollectionElementInitializer = (BoundCollectionElementInitializer)containingExpression;
return DeriveArguments(boundCollectionElementInitializer.AddMethod, boundCollectionElementInitializer.Arguments, boundCollectionElementInitializer.ArgsToParamsOpt, boundCollectionElementInitializer.DefaultArguments, boundCollectionElementInitializer.Expanded, boundCollectionElementInitializer.Syntax, boundCollectionElementInitializer.InvokedAsExtensionMethod);
}
case BoundKind.FunctionPointerInvocation:
{
BoundFunctionPointerInvocation boundFunctionPointerInvocation = (BoundFunctionPointerInvocation)containingExpression;
return DeriveArguments(boundFunctionPointerInvocation.FunctionPointer.Signature, boundFunctionPointerInvocation.Arguments, default(ImmutableArray<int>), BitVector.Empty, expanded: false, boundFunctionPointerInvocation.Syntax);
}
default:
throw ExceptionUtilities.UnexpectedValue((object)containingExpression.Kind);
}
}
private ImmutableArray<IArgumentOperation> DeriveArguments(Symbol methodOrIndexer, ImmutableArray<BoundExpression> boundArguments, ImmutableArray<int> argumentsToParametersOpt, BitVector defaultArguments, bool expanded, SyntaxNode invocationSyntax, bool invokedAsExtensionMethod = false)
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
if (methodOrIndexer.GetParameters().IsDefaultOrEmpty && boundArguments.IsDefaultOrEmpty)
{
return ImmutableArray<IArgumentOperation>.Empty;
}
return LocalRewriter.MakeArgumentsInEvaluationOrder(this, (CSharpCompilation)(object)_semanticModel.Compilation, invocationSyntax, boundArguments, methodOrIndexer, expanded, argumentsToParametersOpt, defaultArguments, invokedAsExtensionMethod);
}
internal static ImmutableArray<BoundNode> CreateInvalidChildrenFromArgumentsExpression(BoundNode? receiverOpt, ImmutableArray<BoundExpression> arguments, BoundExpression? additionalNodeOpt = null)
{
ArrayBuilder<BoundNode> instance = ArrayBuilder<BoundNode>.GetInstance();
if (receiverOpt != null && (!receiverOpt.WasCompilerGenerated || (receiverOpt.Kind != BoundKind.ThisReference && receiverOpt.Kind != BoundKind.BaseReference && receiverOpt.Kind != BoundKind.ObjectOrCollectionValuePlaceholder)))
{
instance.Add(receiverOpt);
}
instance.AddRange(StaticCast<BoundNode>.From<BoundExpression>(arguments));
ArrayBuilderExtensions.AddIfNotNull<BoundNode>(instance, (BoundNode)additionalNodeOpt);
return instance.ToImmutableAndFree();
}
internal ImmutableArray<IOperation> GetAnonymousObjectCreationInitializers(ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, SyntaxNode syntax, ITypeSymbol type, bool isImplicit)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
ArrayBuilder<IOperation> instance = ArrayBuilder<IOperation>.GetInstance(arguments.Length);
int currentDeclarationIndex = 0;
for (int i = 0; i < arguments.Length; i++)
{
IOperation val = Create(arguments[i]);
InstanceReferenceOperation val2 = new InstanceReferenceOperation((InstanceReferenceKind)1, _semanticModel, syntax, type, true);
PropertySymbol anonymousTypeProperty = AnonymousTypeManager.GetAnonymousTypeProperty(((ISymbol?)(object)type).GetSymbol<NamedTypeSymbol>(), i);
BoundAnonymousPropertyDeclaration boundAnonymousPropertyDeclaration = getDeclaration(declarations, anonymousTypeProperty, ref currentDeclarationIndex);
IOperation val3;
bool flag;
if (boundAnonymousPropertyDeclaration == null)
{
val3 = (IOperation)new PropertyReferenceOperation(anonymousTypeProperty.GetPublicSymbol(), (ITypeSymbol)null, ImmutableArray<IArgumentOperation>.Empty, (IOperation)(object)val2, _semanticModel, val.Syntax, anonymousTypeProperty.Type.GetPublicSymbol(), true);
flag = true;
}
else
{
val3 = (IOperation)new PropertyReferenceOperation(boundAnonymousPropertyDeclaration.Property.GetPublicSymbol(), (ITypeSymbol)null, ImmutableArray<IArgumentOperation>.Empty, (IOperation)(object)val2, _semanticModel, boundAnonymousPropertyDeclaration.Syntax, boundAnonymousPropertyDeclaration.GetPublicTypeSymbol(), boundAnonymousPropertyDeclaration.WasCompilerGenerated);
flag = isImplicit;
}
SyntaxNode syntax2 = val.Syntax;
SyntaxNode val4 = ((syntax2 != null) ? syntax2.Parent : null) ?? syntax;
ITypeSymbol type2 = val3.Type;
SimpleAssignmentOperation val5 = new SimpleAssignmentOperation(false, val3, val, _semanticModel, val4, type2, OperationExtensions.GetConstantValue(val), flag);
instance.Add((IOperation)(object)val5);
}
return instance.ToImmutableAndFree();
static BoundAnonymousPropertyDeclaration? getDeclaration(ImmutableArray<BoundAnonymousPropertyDeclaration> immutableArray, PropertySymbol currentProperty, ref int reference)
{
if (reference >= immutableArray.Length)
{
return null;
}
BoundAnonymousPropertyDeclaration boundAnonymousPropertyDeclaration2 = immutableArray[reference];
if (currentProperty.MemberIndexOpt == boundAnonymousPropertyDeclaration2.Property.MemberIndexOpt)
{
reference++;
return boundAnonymousPropertyDeclaration2;
}
return null;
}
}
}