Table of Contents

Class CSharpInvocationResolveResult

Namespace
ICSharpCode.Decompiler.CSharp.Resolver
Assembly
ICSharpCode.Decompiler.dll

Represents the result of a method, constructor or indexer invocation. Provides additional C#-specific information for InvocationResolveResult.

public class CSharpInvocationResolveResult : InvocationResolveResult
Inheritance
CSharpInvocationResolveResult
Inherited Members
Extension Methods

Constructors

CSharpInvocationResolveResult(ResolveResult, IParameterizedMember, IList<ResolveResult>, OverloadResolutionErrors, bool, bool, bool, IReadOnlyList<int>, IList<ResolveResult>, IType)

public CSharpInvocationResolveResult(ResolveResult targetResult, IParameterizedMember member, IList<ResolveResult> arguments, OverloadResolutionErrors overloadResolutionErrors = OverloadResolutionErrors.None, bool isExtensionMethodInvocation = false, bool isExpandedForm = false, bool isDelegateInvocation = false, IReadOnlyList<int> argumentToParameterMap = null, IList<ResolveResult> initializerStatements = null, IType returnTypeOverride = null)

Parameters

targetResult ResolveResult
member IParameterizedMember
arguments IList<ResolveResult>
overloadResolutionErrors OverloadResolutionErrors
isExtensionMethodInvocation bool
isExpandedForm bool
isDelegateInvocation bool
argumentToParameterMap IReadOnlyList<int>
initializerStatements IList<ResolveResult>
returnTypeOverride IType

Fields

IsDelegateInvocation

Gets whether this invocation is calling a delegate (without explicitly calling ".Invoke()").

public readonly bool IsDelegateInvocation

Field Value

bool

IsExpandedForm

Gets whether a params-Array is being used in its expanded form.

public readonly bool IsExpandedForm

Field Value

bool

IsExtensionMethodInvocation

Gets whether this invocation is calling an extension method using extension method syntax.

public readonly bool IsExtensionMethodInvocation

Field Value

bool

OverloadResolutionErrors

public readonly OverloadResolutionErrors OverloadResolutionErrors

Field Value

OverloadResolutionErrors

Properties

IsError

public override bool IsError { get; }

Property Value

bool

Methods

GetArgumentToParameterMap()

Gets an array that maps argument indices to parameter indices. For arguments that could not be mapped to any parameter, the value will be -1.

parameterIndex = ArgumentToParameterMap[argumentIndex]

public IReadOnlyList<int> GetArgumentToParameterMap()

Returns

IReadOnlyList<int>

GetArgumentsForCall()

Gets the arguments in the order they are being passed to the method. For parameter arrays (params), this will return an ArrayCreateResolveResult.

public override IList<ResolveResult> GetArgumentsForCall()

Returns

IList<ResolveResult>