protected virtual IEntity ResolveAmbiguousMethodInvocation(MethodInvocationExpression node, IEntity entity)
{
Ambiguous ambiguous = entity as Ambiguous;
if (ambiguous == null)
return entity;
_context.TraceVerbose("{0}: resolving ambigous method invocation: {1}", node.LexicalInfo, entity);
IEntity resolved = ResolveCallableReference(node, ambiguous);
if (null != resolved)
return resolved;
// If resolution fails, try to resolve target as an extension method (but no more than once)
if (!ResolvedAsExtension(node) && TryToProcessAsExtensionInvocation(node))
{
return null;
}
return CantResolveAmbiguousMethodInvocation(node, ambiguous.Entities);
}