jiowchern/Regulus.Remote

View on GitHub

Showing 49 of 103 total issues

File SoulProvider.cs has 337 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Regulus.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
Severity: Minor
Found in Regulus.Remote/SoulProvider.cs - About 4 hrs to fix

    Class SocketMessage has 32 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public sealed class SocketMessage
        {
            public const int SeqIndex = 0;
            public const int AckIndex = SeqIndex + 2;
            public const int AckbitsIndex = AckIndex + 2;
    Severity: Minor
    Found in Regulus.Network/Package/SocketMessage.cs - About 4 hrs to fix

      Class SoulProvider has 28 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public class SoulProvider : IDisposable, IBinder
          {
              private readonly IdLandlord _IdLandlord;
              private readonly Queue<byte[]> _EventFilter ;
      
      
      Severity: Minor
      Found in Regulus.Remote/SoulProvider.cs - About 3 hrs to fix

        File GhostProviderQueryer.cs has 302 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using Regulus.Remote.Extensions;
        using Regulus.Remote.Packages;
        using Regulus.Utility;
        using System;
        using System.Collections.Generic;
        Severity: Minor
        Found in Regulus.Remote/GhostProviderQueryer.cs - About 3 hrs to fix

          Method Mod has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public ClassAndTypes Mod(ClassDeclarationSyntax type)
                  {
                      var methods = type.DescendantNodes().OfType<MethodDeclarationSyntax>();
          
                      type = _ModifyMethodParameters(type, methods);
          Severity: Major
          Found in Regulus.Remote.Tools.Protocol.Sources/SyntaxModifier.cs - About 2 hrs to fix

            Class GhostProviderQueryer has 24 methods (exceeds 20 allowed). Consider refactoring.
            Open

                public class GhostProviderQueryer
                {
                    private readonly AutoRelease<long ,IGhost> _AutoRelease;
            
                    private readonly Dictionary<Type, IProvider> _Providers;
            Severity: Minor
            Found in Regulus.Remote/GhostProviderQueryer.cs - About 2 hrs to fix

              Class MemberMap has 22 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  public class MemberMap : IEqualityComparer<Type>, IEqualityComparer<PropertyInfo>, IEqualityComparer<EventInfo>, IEqualityComparer<MethodInfo>, IEqualityComparer<int>
                  {
              
                      private readonly BilateralMap<int, MethodInfo> _Methods;
                      private readonly BilateralMap<int, EventInfo> _Events;
              Severity: Minor
              Found in Regulus.Remote/MemberMap.cs - About 2 hrs to fix

                Method CreateRegulusRemoteIEventProxyCreater has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public static ClassDeclarationSyntax CreateRegulusRemoteIEventProxyCreater(this EventDeclarationSyntax eds)
                        {
                            
                            var een = eds.ExplicitInterfaceSpecifier.Name.ToString().Replace('.', '_');
                
                

                  Method _OnResponse has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          protected void _OnResponse(ServerToClientOpCode code, byte[] args)
                          {
                              _UpdateAutoRelease();
                              if (code == ServerToClientOpCode.Ping)
                              {
                  Severity: Major
                  Found in Regulus.Remote/GhostProviderQueryer.cs - About 2 hrs to fix

                    Method Constructor has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static ConstructorDeclarationSyntax Constructor(SyntaxToken name)
                            {
                                return ConstructorDeclaration(
                                                        name
                                                    )

                      Method Mod has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public PropertyAndBlock Mod(System.Collections.Generic.IEnumerable<SyntaxNode> nodes)
                              {
                                  var block = nodes.Skip(0).FirstOrDefault() as BlockSyntax;
                                  var ad = nodes.Skip(1).FirstOrDefault() as AccessorDeclarationSyntax;
                                  var al = nodes.Skip(2).FirstOrDefault() as AccessorListSyntax;
                      Severity: Minor
                      Found in Regulus.Remote.Tools.Protocol.Sources/PropertyRegulusRemoteBlock.cs - About 1 hr to fix

                        Method Mod has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public BlockAndEvent Mod(System.Collections.Generic.IEnumerable<SyntaxNode> nodes)
                                {
                                    
                                    var block = nodes.Skip(0).FirstOrDefault() as BlockSyntax;
                                    var ad = nodes.Skip(1).FirstOrDefault() as AccessorDeclarationSyntax;
                        Severity: Minor
                        Found in Regulus.Remote.Tools.Protocol.Sources/EventBlockModifier.cs - About 1 hr to fix

                          Method ToInferredInterface has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public static InterfaceDeclarationSyntax ToInferredInterface(this INamedTypeSymbol symbol)
                                  {
                                      
                                      var syntax = SyntaxFactory.InterfaceDeclaration(symbol.Name);
                          
                          
                          Severity: Minor
                          Found in Regulus.Remote.Tools.Protocol.Sources/SyntaxExtensions.cs - About 1 hr to fix

                            Method ToObject has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    int ITypeDescriber.ToObject(byte[] buffer, int begin, out object instance)
                                    {
                                        ulong value;
                                        int readed = Varint.BufferToNumber(buffer, begin, out value);
                            
                            
                            Severity: Minor
                            Found in Regulus.Serialization/NumberDescriber.cs - About 1 hr to fix

                              Method Mod has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public BlockAndTypes Mod(System.Collections.Generic.IEnumerable<SyntaxNode> nodes)
                                      {
                                          var block = nodes.Skip(0).FirstOrDefault() as BlockSyntax;
                                          var md = nodes.Skip(1).FirstOrDefault() as MethodDeclarationSyntax;
                                          var cd = nodes.Skip(2).FirstOrDefault() as ClassDeclarationSyntax;

                                Method _InvokeMethod has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        private void _InvokeMethod(long entity_id, int method_id, long returnId, byte[][] args)
                                        {
                                          
                                            SoulProxy soul;
                                            if (!_Souls.TryGetValue(entity_id, out soul))
                                Severity: Minor
                                Found in Regulus.Remote/SoulProvider.cs - About 1 hr to fix

                                  Method Mod has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          public BlockAndTypes Mod(System.Collections.Generic.IEnumerable<SyntaxNode> nodes)
                                          {
                                              var block = nodes.Skip(0).FirstOrDefault() as BlockSyntax;            
                                              var md = nodes.Skip(1).FirstOrDefault() as MethodDeclarationSyntax;
                                              var cd = nodes.Skip(2).FirstOrDefault() as ClassDeclarationSyntax;
                                  Severity: Minor
                                  Found in Regulus.Remote.Tools.Protocol.Sources/MethodVoid.cs - About 1 hr to fix

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

                                            public List<SocketMessage> PopLost(long Ticks, long Delta)
                                            {
                                                int count = m_Capacity;
                                                List<SocketMessage> packages = new List<SocketMessage>();
                                                foreach (Item item in m_Items.Values)
                                    Severity: Minor
                                    Found in Regulus.Network/CongestionRecorder.cs - About 1 hr to fix

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

                                              public static string GetNamePath(this BaseTypeDeclarationSyntax syntax)
                                              {
                                                  
                                                  var names = new System.Collections.Generic.Stack<string>();
                                      
                                      
                                      Severity: Minor
                                      Found in Regulus.Remote.Tools.Protocol.Sources/SyntaxExtensions.cs - About 1 hr to fix

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

                                                public int Read(byte[] buffer, int offset, int buffer_count)
                                                {
                                                    lock (_Packages)
                                                    {
                                                        int count = buffer_count < buffer.Length ? buffer_count : buffer.Length;
                                        Severity: Minor
                                        Found in Regulus.Network/SegmentStream.cs - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language