Browse Source

[TypeSystem] Specialized method now contains a flag specifying the

extension method mode.
There needs some distinction between extension methods calles foo.Ext
(); and Class.Ext(foo); even if it's the same method call - it's
different for code completion tooltips.
pull/32/merge
Mike Krüger 13 years ago
parent
commit
bd1811cc18
  1. 2
      ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs
  2. 8
      ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs

2
ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs

@ -950,6 +950,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -950,6 +950,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (member == null)
throw new InvalidOperationException();
if (this.IsExtensionMethodInvocation)
((SpecializedMethod)member).IsExtendedExtensionMethod = true;
return new CSharpInvocationResolveResult(
this.IsExtensionMethodInvocation ? new TypeResolveResult(member.DeclaringType) : targetResolveResult,
member,

8
ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs

@ -154,6 +154,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -154,6 +154,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
}
/// <summary>
/// Gets/Sets whether the method is an extension method that are being called using extension method syntax.
/// </summary>
public bool IsExtendedExtensionMethod {
get;
set;
}
public override IMemberReference ToMemberReference()
{
// Pass the MethodTypeArguments to the SpecializingMemberReference only if

Loading…
Cancel
Save