|
|
|
|
@ -20,6 +20,7 @@ using System;
@@ -20,6 +20,7 @@ using System;
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Diagnostics; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Net.NetworkInformation; |
|
|
|
|
|
|
|
|
|
using ICSharpCode.Decompiler.Semantics; |
|
|
|
|
using ICSharpCode.Decompiler.TypeSystem; |
|
|
|
|
@ -81,6 +82,7 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver
@@ -81,6 +82,7 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver
|
|
|
|
|
readonly IReadOnlyList<IType> typeArguments; |
|
|
|
|
readonly ResolveResult targetResult; |
|
|
|
|
readonly string methodName; |
|
|
|
|
IMethod chosenMethod; |
|
|
|
|
|
|
|
|
|
public MethodGroupResolveResult(ResolveResult targetResult, string methodName, |
|
|
|
|
IReadOnlyList<MethodListWithDeclaringType> methods, IReadOnlyList<IType> typeArguments) |
|
|
|
|
@ -148,6 +150,20 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver
@@ -148,6 +150,20 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver
|
|
|
|
|
// the resolver is used to fetch extension methods on demand
|
|
|
|
|
internal CSharpResolver resolver; |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the method that was chosen for this group.
|
|
|
|
|
///
|
|
|
|
|
/// Only set for MethodGroupResolveResults found in ILSpy AST annotations.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public IMethod ChosenMethod => chosenMethod; |
|
|
|
|
|
|
|
|
|
public MethodGroupResolveResult WithChosenMethod(IMethod method) |
|
|
|
|
{ |
|
|
|
|
var result = (MethodGroupResolveResult)ShallowClone(); |
|
|
|
|
result.chosenMethod = method; |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all candidate extension methods.
|
|
|
|
|
/// Note: this includes candidates that are not eligible due to an inapplicable
|
|
|
|
|
|