public static IList GetParameters()

in ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Util/FcsSymbolMappingUtil.cs [500:529]


    public static IList<IParameter> GetParameters<T>(this T function, FSharpMemberOrFunctionOrValue mfv)
      where T : IFSharpParameterOwnerMember, IFSharpTypeParametersOwner
    {
      if (mfv == null)
        return EmptyList<IParameter>.Instance;

      var paramGroups = mfv.CurriedParameterGroups;
      var isFsExtension = mfv.IsExtensionMember;
      var isVoidReturn = paramGroups.Count == 1 && paramGroups[0].Count == 1 && paramGroups[0][0].Type.IsUnitType;

      if (!isFsExtension && isVoidReturn)
        return EmptyArray<IParameter>.Instance;

      var paramsCount = paramGroups.Sum(list => list.Count);
      if (paramsCount == 0)
        return EmptyList<IParameter>.Instance;

      var result = new List<IParameter>(paramsCount);

      if (isFsExtension && mfv.IsInstanceMember)
        result.Add(new FSharpExtensionMemberThisParameter(function));

      if (isVoidReturn)
        return result;

      foreach (var parameterGroup in function.FSharpParameterGroups)
        result.AddRange(parameterGroup);

      return result;
    }