add resharper and hover effect for modules; change navigation bar

This commit is contained in:
Rene Schwarz
2021-08-10 02:03:11 +02:00
parent cdb86331e5
commit 910383775b
64 changed files with 792 additions and 832 deletions

View File

@@ -7,21 +7,21 @@ using System.IO;
using System.Text;
namespace Server_Dashboard_Socket.Protocol {
/// <summary>
/// Json serializer class
/// </summary>
public class JsonMessageProtocol : Protocol<JObject> {
//The Json serializer and the settings
static readonly JsonSerializer serializer;
static readonly JsonSerializerSettings settings;
private static readonly JsonSerializer serializer;
/// <summary>
/// Settings for the Json Serializer
/// </summary>
static JsonMessageProtocol() {
//Set the settings
settings = new JsonSerializerSettings {
JsonSerializerSettings settings = new JsonSerializerSettings {
Formatting = Formatting.Indented,
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
ContractResolver = new DefaultContractResolver {
@@ -34,6 +34,7 @@ namespace Server_Dashboard_Socket.Protocol {
//Creates the serializer with the settings
serializer = JsonSerializer.Create(settings);
}
//Decode the message, to Json
protected override JObject Decode(byte[] message) => JObject.Parse(Encoding.UTF8.GetString(message));
@@ -50,4 +51,4 @@ namespace Server_Dashboard_Socket.Protocol {
return Encoding.UTF8.GetBytes(sb.ToString());
}
}
}
}