guibranco/CrispyWaffle

View on GitHub

Showing 45 of 121 total issues

Method AddFromType has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public QueryStringBuilder AddFromType<T>(
            T instance,
            bool convertCamelCaseToUnderscore = true
        )
        {
Severity: Minor
Found in Src/CrispyWaffle/Utilities/QueryStringBuilder.cs - About 1 hr to fix

    Method ResolveMultipleConstructors has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private static ConstructorInfo ResolveMultipleConstructors(
                ConstructorInfo[] constructors,
                Type parentType = null
            )
            {
    Severity: Minor
    Found in Src/CrispyWaffle/Composition/ServiceLocator.cs - About 1 hr to fix

      Method Levenshtein has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Pure]
              public static int Levenshtein(this string input, string inputToCompare)
              {
                  var n = input.Length;
      
      Severity: Minor
      Found in Src/CrispyWaffle/Extensions/StringExtensions.cs - About 1 hr to fix

        Method ConfigureSource has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private static void ConfigureSource(EventLog log, string source)
                {
                    var sourceData = new EventSourceCreationData(source, log.Log)
                    {
                        MachineName = log.MachineName
        Severity: Minor
        Found in Src/CrispyWaffle.Eventlog/Log/Adapters/EventLogAdapter.cs - About 1 hr to fix

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

              public virtual void Save<T>(string file, T deserialized)
                  where T : class
              {
                  Stream stream = null;
                  try
          Severity: Minor
          Found in Src/CrispyWaffle/Serialization/Adapters/BaseSerializerAdapter.cs - About 1 hr to fix

            Method UpdateValueInternal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private static void UpdateValueInternal<T>(
                        T currentObject,
                        T newObject,
                        PropertyInfo propertyInfo,
                        T defaultObject,
            Severity: Minor
            Found in Src/CrispyWaffle/Extensions/TypeExtensions.cs - About 1 hr to fix

              Method Read has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public override NotNullObserver Read(
                          ref Utf8JsonReader reader,
                          Type typeToConvert,
                          JsonSerializerOptions options
                      )

                Method Get has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public T Get<T>(string key, string subKey)
                        {
                            try
                            {
                                if (
                Severity: Minor
                Found in Src/CrispyWaffle.Redis/Cache/RedisCacheRepository.cs - About 1 hr to fix

                  Method DoWork has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private void DoWork(
                              string exchange,
                              string queue,
                              bool autoAck,
                              CancellationToken cancellationToken
                  Severity: Minor
                  Found in Src/CrispyWaffle.RabbitMQ/Helpers/MessageReceiver.cs - About 1 hr to fix

                    Method ToModule10 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static int ToModule10(this string input)
                            {
                                var number = Regex.Replace(
                                    input,
                                    "[^0-9]",
                    Severity: Minor
                    Found in Src/CrispyWaffle/Extensions/ConversionExtensions.cs - About 1 hr to fix

                      Method GetHumanReadableValue has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public static string GetHumanReadableValue(this Enum value, string flagsSeparator = " | ")
                              {
                                  var type = value.GetType();
                                  if (
                                      type.GetCustomAttributes(typeof(FlagsAttribute), false).Any()
                      Severity: Minor
                      Found in Src/CrispyWaffle/Extensions/EnumExtensions.cs - About 1 hr to fix

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

                                public static string Encrypt(
                                    this string plainText,
                                    string passwordHash,
                                    string saltKey,
                                    string viKey
                        Severity: Minor
                        Found in Src/CrispyWaffle/Cryptography/Security.cs - About 1 hr to fix

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

                                  public static bool TryParseBrazilianPhoneNumber(this string number, ref PhoneNumber result)
                                  {
                                      var dirty = number.RemoveNonNumeric();
                                      var dirtyLength = dirty.Length;
                          
                          Severity: Minor
                          Found in Src/CrispyWaffle/Extensions/ConversionExtensions.cs - About 1 hr to fix

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

                                    public static bool IsNumericType(this Type type)
                                    {
                                        while (true)
                                        {
                                            var typeCode = Type.GetTypeCode(type);
                            Severity: Minor
                            Found in Src/CrispyWaffle/Extensions/TypeExtensions.cs - About 1 hr to fix

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

                                      public static string GetMessages(
                                          this Queue<Exception> exceptions,
                                          string category,
                                          ICollection<ILogProvider> additionalProviders
                                      )
                              Severity: Minor
                              Found in Src/CrispyWaffle/Extensions/ExceptionExtensions.cs - About 1 hr to fix

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

                                        private void RemoveInternal(string path)
                                        {
                                            try
                                            {
                                                LogConsumer.Info("Uploading to FtpClient the file: {0}", path.GetPathOrFileName());
                                Severity: Minor
                                Found in Src/CrispyWaffle.Utils/Communications/FtpClient.cs - About 1 hr to fix

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

                                          private static List<int> GenerateRange(string value)
                                          {
                                              var result = new List<int>();
                                  
                                              var split = value.Split('-');
                                  Severity: Minor
                                  Found in Src/CrispyWaffle/Scheduler/CronScheduler.cs - About 1 hr to fix

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

                                            private static void ParseParameters<T>(
                                                T instance,
                                                bool useNonPublic,
                                                Type type,
                                                ParameterInfo parameter,
                                    Severity: Minor
                                    Found in Src/CrispyWaffle/Extensions/ConversionExtensions.cs - About 1 hr to fix

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

                                              public static T Get<T>([Localizable(false)] string key, [Localizable(false)] string subKey)
                                              {
                                                  LogConsumer.Trace(
                                                      "Getting {0}/{2} from any of {1} cache repositories",
                                                      key,
                                      Severity: Minor
                                      Found in Src/CrispyWaffle/Cache/CacheManager.cs - About 1 hr to fix

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

                                                private static string GetCategory()
                                                {
                                                    var stack = new StackTrace();
                                                    var counter = 1;
                                                    while (true)
                                        Severity: Minor
                                        Found in Src/CrispyWaffle.Elmah/ElmahExceptionHandler.cs - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language