示例#1
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("ConnectTime:" + ConnectTime.ToString("yyyy-MM-dd HH:mm:ss"));
            builder.Append("\n");
            builder.Append("DisconnectTime:" + DisconnectTime.ToString("yyyy-MM-dd HH:mm:ss"));
            builder.Append("\n");
            builder.Append("ReceiveAllPackets:" + ReceiveAllPackets);
            builder.Append("\n");

            builder.Append("ReceiveDataPackets:" + ReceiveDataPackets);
            builder.Append("\n");

            builder.Append("ReceiveAllBytes:" + ReceiveAllBytes);
            builder.Append("\n");

            builder.Append("ReceiveDataBytes:" + ReceiveDataBytes);
            builder.Append("\n");

            builder.Append("SendAllPackets:" + SendAllPackets);
            builder.Append("\n");

            builder.Append("SendDataPackets:" + SendDataPackets);
            builder.Append("\n");

            builder.Append("SendAllBytes:" + SendAllBytes);
            builder.Append("\n");

            builder.Append("SendDataBytes:" + SendDataBytes);

            return(builder.ToString());
        }
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UnitName.Length != 0)
            {
                hash ^= UnitName.GetHashCode();
            }
            if (DevHost.Length != 0)
            {
                hash ^= DevHost.GetHashCode();
            }
            if (ConnectTime.Length != 0)
            {
                hash ^= ConnectTime.GetHashCode();
            }
            if (DevStatus != 0)
            {
                hash ^= DevStatus.GetHashCode();
            }
            return(hash);
        }
示例#3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserName.Length != 0)
            {
                hash ^= UserName.GetHashCode();
            }
            if (EndPoint.Length != 0)
            {
                hash ^= EndPoint.GetHashCode();
            }
            if (ConnectTime.Length != 0)
            {
                hash ^= ConnectTime.GetHashCode();
            }
            if (CitStatus != 0)
            {
                hash ^= CitStatus.GetHashCode();
            }
            return(hash);
        }
示例#4
0
 public override string ToString()
 {
     return($"Name: {Name} ClientType: {ClientType} ConnectTime (UTC): {ConnectTime.ToString()} RoomId: {RoomId}");
 }