Minor stype cleanup

This commit is contained in:
Dominion
2023-04-22 12:28:57 -04:00
parent 7663296099
commit 28b57a1ee4
3 changed files with 40 additions and 16 deletions
+9 -1
View File
@@ -17,7 +17,15 @@ namespace Tgstation.Server.Host.Console
/// <summary>
/// The <see cref="IWatchdogFactory"/> for the <see cref="Program"/>.
/// </summary>
internal static IWatchdogFactory WatchdogFactory { get; set; } = new WatchdogFactory();
internal static IWatchdogFactory WatchdogFactory { get; set; }
/// <summary>
/// Initializes static members of the <see cref="Program"/> class.
/// </summary>
static Program()
{
WatchdogFactory = new WatchdogFactory();
}
/// <summary>
/// Entrypoint for the application.
@@ -27,7 +27,7 @@ namespace Tgstation.Server.Host.Controllers
/// <summary>
/// If the content of bridge requests and responses should be logged.
/// </summary>
internal static bool LogContent { get; set; } = true;
internal static bool LogContent { get; set; }
/// <summary>
/// Static counter for the number of requests processed.
@@ -44,6 +44,14 @@ namespace Tgstation.Server.Host.Controllers
/// </summary>
readonly ILogger<BridgeController> logger;
/// <summary>
/// Initializes static members of the <see cref="BridgeController"/> class.
/// </summary>
static BridgeController()
{
LogContent = true;
}
/// <summary>
/// Initializes a new instance of the <see cref="BridgeController"/> class.
/// </summary>
+22 -14
View File
@@ -52,20 +52,7 @@ namespace Tgstation.Server.Host.Swarm
/// <summary>
/// See <see cref="JsonSerializerSettings"/> for the swarm system.
/// </summary>
internal static JsonSerializerSettings SerializerSettings { get; } = new ()
{
ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy(),
},
Converters = new JsonConverter[]
{
new VersionConverter(),
new BoolConverter(),
},
DefaultValueHandling = DefaultValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
};
internal static JsonSerializerSettings SerializerSettings { get; }
/// <inheritdoc />
public bool ExpectedNumberOfNodesConnected
@@ -187,6 +174,27 @@ namespace Tgstation.Server.Host.Swarm
/// </summary>
bool serversDirty;
/// <summary>
/// Initializes static members of the <see cref="SwarmService"/> class.
/// </summary>
static SwarmService()
{
SerializerSettings = new ()
{
ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy(),
},
Converters = new JsonConverter[]
{
new VersionConverter(),
new BoolConverter(),
},
DefaultValueHandling = DefaultValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
};
}
/// <summary>
/// Initializes a new instance of the <see cref="SwarmService"/> class.
/// </summary>