/// <summary>
/// Attempts to infer the generic parameters of a method from a set of arguments.
/// </summary>
/// <returns>
/// An array consisting of inferred types for the method's generic arguments,
/// or null if type inference failed.
/// </returns>
public IType[] InferMethodGenericArguments(IMethod method, ExpressionCollection arguments)
{
if (method.GenericInfo == null) return null;
GenericParameterInferrer inferrerr = new GenericParameterInferrer(Context, method, arguments);
if (inferrerr.Run())
{
return inferrerr.GetInferredTypes();
}
return null;
}