mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
Update codebase to target .NET 8.0 and improve JSON serialization
This commit switches our target framework from .NET 6.0 to .NET 8.0 and replaces Newtonsoft.Json with System.Text.Json for serialization. The JsonConverter classes have been updated to support the new JSON model and some enhancements were applied to the codebase such as fixing a command property and updating various package references.
This commit is contained in:
parent
8f60a37321
commit
0dedff9d48
@ -263,7 +263,7 @@ namespace IW4MAdmin.Application
|
||||
applicationManager.Start(),
|
||||
versionChecker.CheckVersion(),
|
||||
webfrontTask,
|
||||
masterCommunicator.RunUploadStatus(_serverManager.CancellationToken),
|
||||
//masterCommunicator.RunUploadStatus(_serverManager.CancellationToken),
|
||||
collectionService.BeginCollectionAsync(cancellationToken: _serverManager.CancellationToken)
|
||||
};
|
||||
|
||||
|
@ -222,7 +222,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
RatingChange = (rankingsDict[s.ClientId].Last().Ranking -
|
||||
rankingsDict[s.ClientId].First().Ranking) ?? 0,
|
||||
PerformanceHistory = rankingsDict[s.ClientId].Select(ranking => new PerformanceHistory
|
||||
{ Performance = ranking.PerformanceMetric ?? 0, OccurredAt = ranking.CreatedDateTime })
|
||||
{Performance = ranking.PerformanceMetric ?? 0, OccurredAt = ranking.CreatedDateTime})
|
||||
.ToList(),
|
||||
TimePlayed = Math.Round(s.TotalTimePlayed / 3600.0, 1).ToString("#,##0"),
|
||||
TimePlayedValue = TimeSpan.FromSeconds(s.TotalTimePlayed),
|
||||
@ -285,7 +285,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
.Select(grp => new
|
||||
{
|
||||
grp.Key,
|
||||
Ratings = grp.Select(r => new { r.Performance, r.Ranking, r.When })
|
||||
Ratings = grp.Select(r => new {r.Performance, r.Ranking, r.When})
|
||||
});
|
||||
|
||||
var iqStatsInfo = (from stat in context.Set<EFClientStatistics>()
|
||||
@ -323,7 +323,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
ratingInfo.First(r => r.Key == s.ClientId).Ratings.Last().Ranking,
|
||||
PerformanceHistory = ratingInfo.First(r => r.Key == s.ClientId).Ratings.Count() > 1
|
||||
? ratingInfo.First(r => r.Key == s.ClientId).Ratings.OrderBy(r => r.When)
|
||||
.Select(r => new PerformanceHistory { Performance = r.Performance, OccurredAt = r.When })
|
||||
.Select(r => new PerformanceHistory {Performance = r.Performance, OccurredAt = r.When})
|
||||
.ToList()
|
||||
: new List<PerformanceHistory>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user