* Stylecop Rules and Fixes
This commit is contained in:
Qstick
2020-01-03 07:49:24 -05:00
committed by GitHub
parent 63d669178d
commit f77a2feeef
1307 changed files with 8704 additions and 7404 deletions
@@ -66,10 +66,10 @@ namespace NzbDrone.Host.Middleware
x.MapHub<MessageHub>("/signalr/messages");
});
#endif
// This is a side effect of haing multiple IoC containers, TinyIoC and whatever
// Kestrel/SignalR is using. Ideally we'd have one IoC container, but that's non-trivial with TinyIoC
// TODO: Use a single IoC container if supported for TinyIoC or if we switch to another system (ie Autofac).
var hubContext = appBuilder.ApplicationServices.GetService<IHubContext<MessageHub>>();
_container.Register(hubContext);
}
@@ -91,13 +91,17 @@ namespace NzbDrone.Host
.AddSignalR()
#if !NETCOREAPP
.AddJsonProtocol(
#else
.AddNewtonsoftJsonProtocol(
#endif
options =>
{
options.PayloadSerializerSettings = Json.GetSerializerSettings();
});
#else
.AddNewtonsoftJsonProtocol(
options =>
{
options.PayloadSerializerSettings = Json.GetSerializerSettings();
});
#endif
})
.Configure(app =>
{