mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Minor stype cleanup
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user