apimatic/core-lib-csharp

View on GitHub

Showing 25 of 48 total issues

Method CreateHttpRequestMessageFromRequest has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private HttpRequestMessage CreateHttpRequestMessageFromRequest(CoreRequest request)
        {
            HttpRequestMessage requestMessage = new HttpRequestMessage
            {
                RequestUri = new Uri(request.QueryUrl),
Severity: Major
Found in APIMatic.Core/Http/HttpClientWrapper.cs - About 2 hrs to fix

    Method PrepareFormFieldsFromObject has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            internal static List<KeyValuePair<string, object>> PrepareFormFieldsFromObject(string name, object value, ArraySerialization arraySerializationFormat, List<KeyValuePair<string, object>> keys = null, PropertyInfo propInfo = null)
            {
                keys = keys ?? new List<KeyValuePair<string, object>>();
    
                if (value == null)
    Severity: Minor
    Found in APIMatic.Core/Utilities/CoreHelper.cs - About 1 hr to fix

      Method DoesRightValContainsSameItems has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private static bool DoesRightValContainsSameItems(JArray leftJArray, object rightVal, bool allowExtra, bool isOrdered)
              {
                  if (!(rightVal is JArray rightJArray))
                  {
                      return false;
      Severity: Minor
      Found in APIMatic.Core/Utilities/TestHelper.cs - About 1 hr to fix

        Method IsArrayOfJsonObjectsProperSubsetOf has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private static bool IsArrayOfJsonObjectsProperSubsetOf(
                        JArray leftList,
                        JArray rightList,
                        bool checkValues,
                        bool allowExtra,
        Severity: Minor
        Found in APIMatic.Core/Utilities/TestHelper.cs - About 1 hr to fix

          Method ModelsArrayToXml has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public static string ModelsArrayToXml<T>(List<T> obj, string arrayName = null, string arrayItemName = null)
                  {
                      if (obj == null)
                      {
                          return string.Empty;
          Severity: Minor
          Found in APIMatic.Core/Utilities/XmlUtility.cs - About 1 hr to fix

            Method GetProcessedValue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private static object GetProcessedValue(object value, PropertyInfo propInfo = null)
                    {
                        if (value is Stream)
                        {
                            return value;
            Severity: Minor
            Found in APIMatic.Core/Utilities/CoreHelper.cs - About 1 hr to fix

              Method AppendContentTypeHeader has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      private void AppendContentTypeHeader()
                      {
                          if (!ContentHeaderKeyRequired("content-type"))
                          {
                              return;
              Severity: Minor
              Found in APIMatic.Core/Request/RequestBuilder.cs - About 1 hr to fix

                Method PrepareFormFieldsForJObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        private static void PrepareFormFieldsForJObject(string name, object value, ArraySerialization arraySerializationFormat, List<KeyValuePair<string, object>> keys, PropertyInfo propInfo)
                Severity: Minor
                Found in APIMatic.Core/Utilities/CoreHelper.cs - About 35 mins to fix

                  Method IsProperSubsetOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                              JObject leftTree,
                              JObject rightTree,
                              bool checkValues,
                              bool allowExtra,
                              bool isOrdered)
                  Severity: Minor
                  Found in APIMatic.Core/Utilities/TestHelper.cs - About 35 mins to fix

                    Method IsArrayOfJsonObjectsProperSubsetOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                    JArray leftList,
                                    JArray rightList,
                                    bool checkValues,
                                    bool allowExtra,
                                    bool isOrdered)
                    Severity: Minor
                    Found in APIMatic.Core/Utilities/TestHelper.cs - About 35 mins to fix

                      Method PrepareFormFieldsFromObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              internal static List<KeyValuePair<string, object>> PrepareFormFieldsFromObject(string name, object value, ArraySerialization arraySerializationFormat, List<KeyValuePair<string, object>> keys = null, PropertyInfo propInfo = null)
                      Severity: Minor
                      Found in APIMatic.Core/Utilities/CoreHelper.cs - About 35 mins to fix

                        Method PrintArray has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                internal static string PrintArray<T>(IEnumerable<T> objList, Func<T, string> converter, string root = null, string itemName = null, string nodeName = null)
                        Severity: Minor
                        Found in APIMatic.Core/Utilities/Date/Xml/XmlPrinter.cs - About 35 mins to fix

                          Method PrepareFormFieldsForDictionary has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  private static void PrepareFormFieldsForDictionary(string name, IDictionary dictionary, ArraySerialization arraySerializationFormat, List<KeyValuePair<string, object>> keys = null, PropertyInfo propInfo = null)
                          Severity: Minor
                          Found in APIMatic.Core/Utilities/CoreHelper.cs - About 35 mins to fix

                            Method IsProperSubsetOf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                        string left,
                                        string right,
                                        bool checkValues,
                                        bool allowExtra,
                                        bool isOrdered)
                            Severity: Minor
                            Found in APIMatic.Core/Utilities/TestHelper.cs - About 35 mins to fix

                              Method IsProperSubsetOfJObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      private static bool IsProperSubsetOfJObject(bool checkValues, bool allowExtra, bool isOrdered, object rightVal, JObject leftSideValue)
                              Severity: Minor
                              Found in APIMatic.Core/Utilities/TestHelper.cs - About 35 mins to fix

                                Method PrepareFormFieldsForEnumerable has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        private static void PrepareFormFieldsForEnumerable(string name, IList enumerable, ArraySerialization arraySerializationFormat, List<KeyValuePair<string, object>> keys, PropertyInfo propInfo)
                                Severity: Minor
                                Found in APIMatic.Core/Utilities/CoreHelper.cs - About 35 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return;
                                  Severity: Major
                                  Found in APIMatic.Core/Request/RequestBuilder.cs - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return jsonValue.GetStoredObject();
                                    Severity: Major
                                    Found in APIMatic.Core/Utilities/CoreHelper.cs - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                      return requestMessage;
                                      Severity: Major
                                      Found in APIMatic.Core/Http/HttpClientWrapper.cs - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                        return requestMessage;
                                        Severity: Major
                                        Found in APIMatic.Core/Http/HttpClientWrapper.cs - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language