diff --git a/Services/Concrete/Excel/MultipleExport.cs b/Services/Concrete/Excel/MultipleExport.cs index 30ba2f8b7..c76c0f646 100644 --- a/Services/Concrete/Excel/MultipleExport.cs +++ b/Services/Concrete/Excel/MultipleExport.cs @@ -112,25 +112,25 @@ public override async Task Generate() cancellationToken.ThrowIfCancellationRequested(); _configuration.OnGeneratingXlsxFile?.Invoke(); - await _generalSheet.Generate(); + _generalSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _playersSheet.Generate(); + _playersSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _teamsSheet.Generate(); + _teamsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _mapsSheet.Generate(); + _mapsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _weaponsSheet.Generate(); + _weaponsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _roundsSheet.Generate(); + _roundsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _killsSheet.Generate(); + _killsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _killMatrixSheet.Generate(); + _killMatrixSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _flashMatrixPlayersSheet.Generate(); + _flashMatrixPlayersSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); - await _flashMatrixTeamsSheet.Generate(); + _flashMatrixTeamsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); return Workbook; diff --git a/Services/Concrete/Excel/Sheets/AbstractSheet.cs b/Services/Concrete/Excel/Sheets/AbstractSheet.cs index 6a6aef1e0..49e11c0c9 100644 --- a/Services/Concrete/Excel/Sheets/AbstractSheet.cs +++ b/Services/Concrete/Excel/Sheets/AbstractSheet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using NPOI.SS.UserModel; namespace Services.Concrete.Excel.Sheets @@ -11,7 +10,7 @@ public abstract class AbstractSheet protected Dictionary Headers; - protected abstract Task GenerateContent(); + protected abstract void GenerateContent(); protected void GenerateHeaders() { @@ -26,10 +25,10 @@ protected void GenerateHeaders() }; } - public async Task Generate() + public void Generate() { GenerateHeaders(); - await GenerateContent(); + GenerateContent(); } public void SetCellValue(IRow row, int index, CellType cellType, dynamic value) diff --git a/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixPlayersSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixPlayersSheet.cs index 19936ca49..fee1500f9 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixPlayersSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixPlayersSheet.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -75,7 +74,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { _playerNamePerSteamId = _playerNamePerSteamId.OrderBy(k => k.Value).ToDictionary(x => x.Key, x => x.Value); @@ -104,8 +103,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.Numeric, duration); } } - - return Task.CompletedTask; } private bool IsMaxPlayerLimitReached() diff --git a/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixTeamsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixTeamsSheet.cs index 2c1deda8b..cf638940c 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixTeamsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/FlashMatrixTeamsSheet.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -33,7 +32,7 @@ public override void AddDemo(Demo demo) ComputeTeamStats(demo.TeamT, demo.TeamCT, blindEvents); } - protected override Task GenerateContent() + protected override void GenerateContent() { _teamNames.Sort(); @@ -57,8 +56,6 @@ protected override Task GenerateContent() SetCellValue(row, killColumnNumber++, CellType.Numeric, duration); } } - - return Task.CompletedTask; } private void ComputeTeamStats(Team team, Team oppositeTeam, List blindEvents) diff --git a/Services/Concrete/Excel/Sheets/Multiple/GeneralSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/GeneralSheet.cs index 0217e9b51..7c3137fbb 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/GeneralSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/GeneralSheet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -74,7 +73,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowNumber = 1; foreach (Demo demo in _demos) @@ -130,8 +129,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.String, demo.Comment); SetCellValue(row, columnNumber, CellType.Boolean, demo.CheaterCount); } - - return Task.CompletedTask; } } } diff --git a/Services/Concrete/Excel/Sheets/Multiple/KillMatrixSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/KillMatrixSheet.cs index 3b4c97fc8..45cb5255b 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/KillMatrixSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/KillMatrixSheet.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -75,7 +74,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { _playerNamePerSteamId = _playerNamePerSteamId.OrderBy(k => k.Value).ToDictionary(x => x.Key, x => x.Value); @@ -104,8 +103,6 @@ protected override Task GenerateContent() SetCellValue(row, killColumnNumber++, CellType.Numeric, killCount); } } - - return Task.CompletedTask; } private bool IsMaxPlayerLimitReached() diff --git a/Services/Concrete/Excel/Sheets/Multiple/KillsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/KillsSheet.cs index 43d270e09..501409957 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/KillsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/KillsSheet.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -59,7 +58,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowNumber = 1; foreach (KeyValuePair kvp in _KillsPerDemoId) @@ -103,8 +102,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber, CellType.Numeric, kill.Point.VictimZ); } } - - return Task.CompletedTask; } } } diff --git a/Services/Concrete/Excel/Sheets/Multiple/MapsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/MapsSheet.cs index 70e1f6eac..526922b3b 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/MapsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/MapsSheet.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -68,7 +67,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowCount = 1; foreach (Map map in _maps) @@ -90,8 +89,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.Numeric, map.BombPlantedOnACount); SetCellValue(row, columnNumber, CellType.Numeric, map.BombPlantedOnBCount); } - - return Task.CompletedTask; } private void ComputeGlobalStats(Demo demo, Map map) diff --git a/Services/Concrete/Excel/Sheets/Multiple/PlayersSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/PlayersSheet.cs index 1b8e8bfb1..f790b8d59 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/PlayersSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/PlayersSheet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; using Services.Models.Excel; @@ -170,7 +169,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowCount = 1; foreach (KeyValuePair playerData in _playersData) @@ -257,8 +256,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.Boolean, playerData.Value.IsVacBanned); SetCellValue(row, columnNumber, CellType.Boolean, playerData.Value.IsOverwatchBanned); } - - return Task.CompletedTask; } } } diff --git a/Services/Concrete/Excel/Sheets/Multiple/RoundsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/RoundsSheet.cs index c55e3d5b9..28384b74b 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/RoundsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/RoundsSheet.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -61,7 +60,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowNumber = 1; foreach (KeyValuePair kvp in _roundsPerDemoId) @@ -110,8 +109,6 @@ protected override Task GenerateContent() rowNumber++; } } - - return Task.CompletedTask; } } } diff --git a/Services/Concrete/Excel/Sheets/Multiple/TeamsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/TeamsSheet.cs index 14daa1bbd..88da04d4b 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/TeamsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/TeamsSheet.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -11,7 +10,7 @@ namespace Services.Concrete.Excel.Sheets.Multiple { public class TeamsSheet : AbstractMultipleSheet { - List _teams = new List(); + readonly List _teams = new List(); public TeamsSheet(IWorkbook workbook) { @@ -86,7 +85,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowCount = 1; foreach (Team team in _teams) @@ -132,8 +131,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.Numeric, team.IncendiaryThrownCount); SetCellValue(row, columnNumber, CellType.Numeric, team.DecoyThrownCount); } - - return Task.CompletedTask; } diff --git a/Services/Concrete/Excel/Sheets/Multiple/WeaponsSheet.cs b/Services/Concrete/Excel/Sheets/Multiple/WeaponsSheet.cs index 5e5178686..f9a636b8f 100644 --- a/Services/Concrete/Excel/Sheets/Multiple/WeaponsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Multiple/WeaponsSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using DemoInfo; @@ -88,7 +87,7 @@ public override void AddDemo(Demo demo) } } - protected override Task GenerateContent() + protected override void GenerateContent() { int rowCount = 1; foreach (KeyValuePair weaponData in _data) @@ -103,8 +102,6 @@ protected override Task GenerateContent() SetCellValue(row, columnNumber++, CellType.Numeric, weaponData.Value.Hits); SetCellValue(row, columnNumber, CellType.Numeric, weaponData.Value.Accurary); } - - return Task.CompletedTask; } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EnryKillsPlayerSheet.cs b/Services/Concrete/Excel/Sheets/Single/EnryKillsPlayerSheet.cs index 5f05f54d1..f74d7632f 100644 --- a/Services/Concrete/Excel/Sheets/Single/EnryKillsPlayerSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EnryKillsPlayerSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -22,26 +21,23 @@ public EntryKillsPlayerSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Kills Players"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - int rowNumber = 1; + int rowNumber = 1; - foreach (Player player in Demo.Players) - { - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, player.Name); - SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKills.Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, player.RatioEntryKill); + foreach (Player player in Demo.Players) + { + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, player.Name); + SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKills.Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, player.RatioEntryKill); - rowNumber++; - } - }); + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsPlayerSheet.cs b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsPlayerSheet.cs index 709f9e22d..a61279e96 100644 --- a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsPlayerSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsPlayerSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -22,26 +21,23 @@ public EntryHoldKillsPlayerSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Hold Kills Players"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - int rowNumber = 1; + int rowNumber = 1; - foreach (Player player in Demo.Players) - { - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, player.Name); - SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKills.Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, player.RatioEntryHoldKill); + foreach (Player player in Demo.Players) + { + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, player.Name); + SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKills.Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryHoldKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, player.RatioEntryHoldKill); - rowNumber++; - } - }); + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsRoundSheet.cs b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsRoundSheet.cs index 47907a5fd..8a645bf5b 100644 --- a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsRoundSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsRoundSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -23,30 +22,27 @@ public EntryHoldKillsRoundSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Hold Kills Rounds"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - int rowNumber = 1; + int rowNumber = 1; - foreach (Round round in Demo.Rounds) + foreach (Round round in Demo.Rounds) + { + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); + if (round.EntryHoldKillEvent != null) { - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); - if (round.EntryHoldKillEvent != null) - { - SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KillerName); - SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KillerSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KilledName); - SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KilledSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.Weapon.Name); - SetCellValue(row, columnNumber, CellType.String, round.EntryHoldKillEvent.HasWonRound ? "yes" : "no"); - } - - rowNumber++; + SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KillerName); + SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KillerSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KilledName); + SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.KilledSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, round.EntryHoldKillEvent.Weapon.Name); + SetCellValue(row, columnNumber, CellType.String, round.EntryHoldKillEvent.HasWonRound ? "yes" : "no"); } - }); + + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsTeamSheet.cs b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsTeamSheet.cs index 1df6ef2b8..0ed0e22c7 100644 --- a/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsTeamSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EntryHoldKillsTeamSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -21,26 +20,23 @@ public EntryHoldKillsTeamSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Hold Kills Teams"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - IRow row = Sheet.CreateRow(1); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamCT.RatioEntryHoldKill); + IRow row = Sheet.CreateRow(1); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryHoldKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamCT.RatioEntryHoldKill); - row = Sheet.CreateRow(2); - columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamT.RatioEntryHoldKill); - }); + row = Sheet.CreateRow(2); + columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryHoldKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamT.RatioEntryHoldKill); } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EntryKillsRoundSheet.cs b/Services/Concrete/Excel/Sheets/Single/EntryKillsRoundSheet.cs index 415453a29..8aea28849 100644 --- a/Services/Concrete/Excel/Sheets/Single/EntryKillsRoundSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EntryKillsRoundSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -23,30 +22,27 @@ public EntryKillsRoundSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Kills Rounds"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - int rowNumber = 1; + int rowNumber = 1; - foreach (Round round in Demo.Rounds) + foreach (Round round in Demo.Rounds) + { + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); + if (round.EntryKillEvent != null) { - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); - if (round.EntryKillEvent != null) - { - SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KillerName); - SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KillerSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KilledName); - SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KilledSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.Weapon.Name); - SetCellValue(row, columnNumber, CellType.String, round.EntryKillEvent.HasWonRound ? "yes" : "no"); - } - - rowNumber++; + SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KillerName); + SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KillerSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KilledName); + SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.KilledSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, round.EntryKillEvent.Weapon.Name); + SetCellValue(row, columnNumber, CellType.String, round.EntryKillEvent.HasWonRound ? "yes" : "no"); } - }); + + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/EntryKillsTeamSheet.cs b/Services/Concrete/Excel/Sheets/Single/EntryKillsTeamSheet.cs index c81f7b8b3..deec591d6 100644 --- a/Services/Concrete/Excel/Sheets/Single/EntryKillsTeamSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/EntryKillsTeamSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -21,26 +20,23 @@ public EntryKillsTeamSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Entry Kills Teams"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - IRow row = Sheet.CreateRow(1); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamCT.RatioEntryKill); + IRow row = Sheet.CreateRow(1); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamCT.EntryKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamCT.RatioEntryKill); - row = Sheet.CreateRow(2); - columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillWonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillLossCount); - SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamT.RatioEntryKill); - }); + row = Sheet.CreateRow(2); + columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillWonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TeamT.EntryKillLossCount); + SetCellValue(row, columnNumber, CellType.Numeric, Demo.TeamT.RatioEntryKill); } } } diff --git a/Services/Concrete/Excel/Sheets/Single/FlashMatrixPlayersSheet.cs b/Services/Concrete/Excel/Sheets/Single/FlashMatrixPlayersSheet.cs index eef6d99f8..e62ec56c4 100644 --- a/Services/Concrete/Excel/Sheets/Single/FlashMatrixPlayersSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/FlashMatrixPlayersSheet.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -16,11 +15,8 @@ public FlashMatrixPlayersSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Flash matrix players"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - CacheService cacheService = new CacheService(); - Demo.PlayerBlinded = await cacheService.GetDemoPlayerBlindedAsync(Demo); - // store players row and columns index Dictionary playersRow = new Dictionary(); Dictionary playersColumn = new Dictionary(); diff --git a/Services/Concrete/Excel/Sheets/Single/FlashMatrixTeamsSheet.cs b/Services/Concrete/Excel/Sheets/Single/FlashMatrixTeamsSheet.cs index 6b1fe6e5e..c3ea190b6 100644 --- a/Services/Concrete/Excel/Sheets/Single/FlashMatrixTeamsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/FlashMatrixTeamsSheet.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -16,11 +15,8 @@ public FlashMatrixTeamsSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Flash matrix teams"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - CacheService cacheService = new CacheService(); - Demo.PlayerBlinded = await cacheService.GetDemoPlayerBlindedAsync(Demo); - // first row containing teams name IRow row = Sheet.CreateRow(0); SetCellValue(row, 0, CellType.String, "Flasher\\Flashed"); diff --git a/Services/Concrete/Excel/Sheets/Single/GeneralSheet.cs b/Services/Concrete/Excel/Sheets/Single/GeneralSheet.cs index fe42d42be..bd2c43aa3 100644 --- a/Services/Concrete/Excel/Sheets/Single/GeneralSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/GeneralSheet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -65,61 +64,58 @@ public GeneralSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("General"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - IRow row = Sheet.CreateRow(1); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, Demo.Name); - SetCellValue(row, columnNumber++, CellType.String, Demo.Id); - SetCellValue(row, columnNumber++, CellType.String, Demo.DateAsString); - SetCellValue(row, columnNumber++, CellType.String, Demo.Type); - SetCellValue(row, columnNumber++, CellType.String, Demo.SourceName); - SetCellValue(row, columnNumber++, CellType.String, Demo.MapName); - SetCellValue(row, columnNumber++, CellType.String, Demo.Hostname); - SetCellValue(row, columnNumber++, CellType.String, Demo.ClientName); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ServerTickrate); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Tickrate); - SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(Demo.Duration, 2)); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Ticks); - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); - SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreTeamCt); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreTeamT); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreFirstHalfTeamCt); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreFirstHalfTeamT); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreSecondHalfTeamCt); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreSecondHalfTeamT); - SetCellValue(row, columnNumber++, CellType.String, Demo.Winner != null ? Demo.Winner.Name : string.Empty); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.KillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.AssistCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FiveKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FourKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ThreeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TwoKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.OneKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TradeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.AverageHealthDamage); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DamageHealthCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DamageArmorCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(Demo.AverageKast, 2)); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ClutchCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombDefusedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombExplodedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombPlantedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FlashbangThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.SmokeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.HeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DecoyThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.MolotovThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.IncendiaryThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.WeaponFiredCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.HitCount); - SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Rounds.Count); - SetCellValue(row, columnNumber++, CellType.String, Demo.Comment); - SetCellValue(row, columnNumber, CellType.Boolean, Demo.CheaterCount); - }); + IRow row = Sheet.CreateRow(1); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, Demo.Name); + SetCellValue(row, columnNumber++, CellType.String, Demo.Id); + SetCellValue(row, columnNumber++, CellType.String, Demo.DateAsString); + SetCellValue(row, columnNumber++, CellType.String, Demo.Type); + SetCellValue(row, columnNumber++, CellType.String, Demo.SourceName); + SetCellValue(row, columnNumber++, CellType.String, Demo.MapName); + SetCellValue(row, columnNumber++, CellType.String, Demo.Hostname); + SetCellValue(row, columnNumber++, CellType.String, Demo.ClientName); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ServerTickrate); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Tickrate); + SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(Demo.Duration, 2)); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Ticks); + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamCT.Name); + SetCellValue(row, columnNumber++, CellType.String, Demo.TeamT.Name); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreTeamCt); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreTeamT); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreFirstHalfTeamCt); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreFirstHalfTeamT); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreSecondHalfTeamCt); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ScoreSecondHalfTeamT); + SetCellValue(row, columnNumber++, CellType.String, Demo.Winner != null ? Demo.Winner.Name : string.Empty); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.KillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.AssistCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FiveKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FourKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ThreeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TwoKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.OneKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.TradeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.AverageHealthDamage); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DamageHealthCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DamageArmorCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(Demo.AverageKast, 2)); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.ClutchCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombDefusedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombExplodedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.BombPlantedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.FlashbangThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.SmokeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.HeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.DecoyThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.MolotovThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.IncendiaryThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.WeaponFiredCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.HitCount); + SetCellValue(row, columnNumber++, CellType.Numeric, Demo.Rounds.Count); + SetCellValue(row, columnNumber++, CellType.String, Demo.Comment); + SetCellValue(row, columnNumber, CellType.Boolean, Demo.CheaterCount); } } } diff --git a/Services/Concrete/Excel/Sheets/Single/KillMatrixSheet.cs b/Services/Concrete/Excel/Sheets/Single/KillMatrixSheet.cs index 07a686fba..00e139ae8 100644 --- a/Services/Concrete/Excel/Sheets/Single/KillMatrixSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/KillMatrixSheet.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -15,54 +14,51 @@ public KillMatrixSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Kill matrix"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Run(() => - { - // store players row and columns index - Dictionary playersRow = new Dictionary(); - Dictionary playersColumn = new Dictionary(); + // store players row and columns index + Dictionary playersRow = new Dictionary(); + Dictionary playersColumn = new Dictionary(); - // first row containing victims name - IRow firstRow = Sheet.CreateRow(0); - SetCellValue(firstRow, 0, CellType.String, "Killer\\Victim"); + // first row containing victims name + IRow firstRow = Sheet.CreateRow(0); + SetCellValue(firstRow, 0, CellType.String, "Killer\\Victim"); - // concat teams players to have a more logic matrix pattern - List players = new List(Demo.TeamCT.Players).Concat(Demo.TeamT.Players).ToList(); + // concat teams players to have a more logic matrix pattern + List players = new List(Demo.TeamCT.Players).Concat(Demo.TeamT.Players).ToList(); - int columnCount = 1; - int rowCount = 1; - // create rows and columns with only players name - foreach (Player player in players) - { - // add a column for this player in the first row - SetCellValue(firstRow, columnCount, CellType.String, player.Name); - playersRow.Add(player.SteamId, rowCount); - // create a row for this player - IRow row = Sheet.CreateRow(rowCount++); - SetCellValue(row, 0, CellType.String, player.Name); - playersColumn.Add(player.SteamId, columnCount++); - } + int columnCount = 1; + int rowCount = 1; + // create rows and columns with only players name + foreach (Player player in players) + { + // add a column for this player in the first row + SetCellValue(firstRow, columnCount, CellType.String, player.Name); + playersRow.Add(player.SteamId, rowCount); + // create a row for this player + IRow row = Sheet.CreateRow(rowCount++); + SetCellValue(row, 0, CellType.String, player.Name); + playersColumn.Add(player.SteamId, columnCount++); + } - // insert kills value - foreach (Player player in players) + // insert kills value + foreach (Player player in players) + { + if (playersRow.ContainsKey(player.SteamId)) { - if (playersRow.ContainsKey(player.SteamId)) + int rowIndex = playersRow[player.SteamId]; + foreach (Player pl in Demo.Players) { - int rowIndex = playersRow[player.SteamId]; - foreach (Player pl in Demo.Players) + if (playersColumn.ContainsKey(pl.SteamId)) { - if (playersColumn.ContainsKey(pl.SteamId)) - { - int columnIndex = playersColumn[pl.SteamId]; - int killCount = Demo.Kills.Count(e => e.KillerSteamId == player.SteamId && e.KilledSteamId == pl.SteamId); - IRow row = Sheet.GetRow(rowIndex); - SetCellValue(row, columnIndex, CellType.Numeric, killCount); - } + int columnIndex = playersColumn[pl.SteamId]; + int killCount = Demo.Kills.Count(e => e.KillerSteamId == player.SteamId && e.KilledSteamId == pl.SteamId); + IRow row = Sheet.GetRow(rowIndex); + SetCellValue(row, columnIndex, CellType.Numeric, killCount); } } } - }); + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/KillsSheet.cs b/Services/Concrete/Excel/Sheets/Single/KillsSheet.cs index f9a7d1341..0680b234e 100644 --- a/Services/Concrete/Excel/Sheets/Single/KillsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/KillsSheet.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using Core.Models.Events; using NPOI.SS.UserModel; @@ -48,48 +47,45 @@ public KillsSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Kills"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => + int rowCount = 1; + foreach (KillEvent e in Demo.Kills) { - int rowCount = 1; - foreach (KillEvent e in Demo.Kills) - { - IRow row = Sheet.CreateRow(rowCount++); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.Numeric, e.Tick); - SetCellValue(row, columnNumber++, CellType.Numeric, e.RoundNumber); - SetCellValue(row, columnNumber++, CellType.Numeric, e.TimeDeathSeconds); - SetCellValue(row, columnNumber++, CellType.String, e.KillerName); - SetCellValue(row, columnNumber++, CellType.String, e.KillerSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, e.KillerSide.AsString()); - SetCellValue(row, columnNumber++, CellType.String, e.KillerTeam); - SetCellValue(row, columnNumber++, CellType.Boolean, e.KillerIsControllingBot); - SetCellValue(row, columnNumber++, CellType.Boolean, e.KillerIsBlinded); - SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityX); - SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityY); - SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityZ); - SetCellValue(row, columnNumber++, CellType.String, e.KilledName); - SetCellValue(row, columnNumber++, CellType.String, e.KilledSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.String, e.KilledSide.AsString()); - SetCellValue(row, columnNumber++, CellType.String, e.KilledTeam); - SetCellValue(row, columnNumber++, CellType.Boolean, e.KilledIsControllingBot); - SetCellValue(row, columnNumber++, CellType.Boolean, e.VictimIsBlinded); - SetCellValue(row, columnNumber++, CellType.String, e.AssisterName); - SetCellValue(row, columnNumber++, CellType.String, e.AssisterSteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.Boolean, e.AssisterIsControllingBot); - SetCellValue(row, columnNumber++, CellType.String, e.Weapon.Name); - SetCellValue(row, columnNumber++, CellType.Boolean, e.IsHeadshot); - SetCellValue(row, columnNumber++, CellType.Boolean, e.IsKillerCrouching); - SetCellValue(row, columnNumber++, CellType.Boolean, e.IsTradeKill); - SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerX); - SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerY); - SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerZ); - SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.VictimX); - SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.VictimY); - SetCellValue(row, columnNumber, CellType.Numeric, e.Point.VictimZ); - } - }); + IRow row = Sheet.CreateRow(rowCount++); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.Numeric, e.Tick); + SetCellValue(row, columnNumber++, CellType.Numeric, e.RoundNumber); + SetCellValue(row, columnNumber++, CellType.Numeric, e.TimeDeathSeconds); + SetCellValue(row, columnNumber++, CellType.String, e.KillerName); + SetCellValue(row, columnNumber++, CellType.String, e.KillerSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, e.KillerSide.AsString()); + SetCellValue(row, columnNumber++, CellType.String, e.KillerTeam); + SetCellValue(row, columnNumber++, CellType.Boolean, e.KillerIsControllingBot); + SetCellValue(row, columnNumber++, CellType.Boolean, e.KillerIsBlinded); + SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityX); + SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityY); + SetCellValue(row, columnNumber++, CellType.Numeric, e.KillerVelocityZ); + SetCellValue(row, columnNumber++, CellType.String, e.KilledName); + SetCellValue(row, columnNumber++, CellType.String, e.KilledSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.String, e.KilledSide.AsString()); + SetCellValue(row, columnNumber++, CellType.String, e.KilledTeam); + SetCellValue(row, columnNumber++, CellType.Boolean, e.KilledIsControllingBot); + SetCellValue(row, columnNumber++, CellType.Boolean, e.VictimIsBlinded); + SetCellValue(row, columnNumber++, CellType.String, e.AssisterName); + SetCellValue(row, columnNumber++, CellType.String, e.AssisterSteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.Boolean, e.AssisterIsControllingBot); + SetCellValue(row, columnNumber++, CellType.String, e.Weapon.Name); + SetCellValue(row, columnNumber++, CellType.Boolean, e.IsHeadshot); + SetCellValue(row, columnNumber++, CellType.Boolean, e.IsKillerCrouching); + SetCellValue(row, columnNumber++, CellType.Boolean, e.IsTradeKill); + SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerX); + SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerY); + SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.KillerZ); + SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.VictimX); + SetCellValue(row, columnNumber++, CellType.Numeric, e.Point.VictimY); + SetCellValue(row, columnNumber, CellType.Numeric, e.Point.VictimZ); + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/PlayersSheet.cs b/Services/Concrete/Excel/Sheets/Single/PlayersSheet.cs index e0d8319bc..f98a36ceb 100644 --- a/Services/Concrete/Excel/Sheets/Single/PlayersSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/PlayersSheet.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -82,84 +80,81 @@ public PlayersSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Players"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - await Task.Factory.StartNew(() => - { - var rowNumber = 1; + var rowNumber = 1; - foreach (Player player in Demo.Players) - { - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.String, player.Name); - SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); - SetCellValue(row, columnNumber++, CellType.Numeric, player.RankNumberNew); - SetCellValue(row, columnNumber++, CellType.String, player.TeamName); - SetCellValue(row, columnNumber++, CellType.Numeric, player.KillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.AssistCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.DeathCount); - SetCellValue(row, columnNumber++, CellType.Numeric, (double)player.KillDeathRatio); - SetCellValue(row, columnNumber++, CellType.Numeric, player.HeadshotCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.HeadshotPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(player.Kast, 2)); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TeamKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKills.Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.BombPlantedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.BombDefusedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.RoundMvpCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Score); - SetCellValue(row, columnNumber++, CellType.Numeric, player.EseaRws); - SetCellValue(row, columnNumber++, CellType.Numeric, player.RatingHltv); - SetCellValue(row, columnNumber++, CellType.Numeric, player.RatingHltv2); - SetCellValue(row, columnNumber++, CellType.Numeric, player.AverageTimeDeath); - SetCellValue(row, columnNumber++, CellType.Numeric, player.KillPerRound); - SetCellValue(row, columnNumber++, CellType.Numeric, player.AssistPerRound); - SetCellValue(row, columnNumber++, CellType.Numeric, player.DeathPerRound); - SetCellValue(row, columnNumber++, CellType.Numeric, player.AverageHealthDamage); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TotalDamageHealthCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TotalDamageArmorCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.FiveKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.FourKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.ThreeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TwoKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.OneKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TradeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.TradeDeathCount); - SetCellValue(row, columnNumber++, CellType.Boolean, player.CrouchKillCount); - SetCellValue(row, columnNumber++, CellType.Boolean, player.JumpKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1WonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1LossCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1WonPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2WonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2LossCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2WonPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3WonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3LossCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3WonPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4WonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4LossCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4WonPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5Count); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5WonCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5LossCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5WonPercent); - SetCellValue(row, columnNumber++, CellType.Numeric, player.FlashbangThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.SmokeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.HeGrenadeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.DecoyThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.MolotovThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, player.IncendiaryThrownCount); - SetCellValue(row, columnNumber++, CellType.Boolean, player.IsVacBanned); - SetCellValue(row, columnNumber, CellType.Boolean, player.IsOverwatchBanned); + foreach (Player player in Demo.Players) + { + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.String, player.Name); + SetCellValue(row, columnNumber++, CellType.String, player.SteamId.ToString()); + SetCellValue(row, columnNumber++, CellType.Numeric, player.RankNumberNew); + SetCellValue(row, columnNumber++, CellType.String, player.TeamName); + SetCellValue(row, columnNumber++, CellType.Numeric, player.KillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.AssistCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.DeathCount); + SetCellValue(row, columnNumber++, CellType.Numeric, (double)player.KillDeathRatio); + SetCellValue(row, columnNumber++, CellType.Numeric, player.HeadshotCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.HeadshotPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(player.Kast, 2)); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TeamKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EntryKills.Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.BombPlantedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.BombDefusedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.RoundMvpCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Score); + SetCellValue(row, columnNumber++, CellType.Numeric, player.EseaRws); + SetCellValue(row, columnNumber++, CellType.Numeric, player.RatingHltv); + SetCellValue(row, columnNumber++, CellType.Numeric, player.RatingHltv2); + SetCellValue(row, columnNumber++, CellType.Numeric, player.AverageTimeDeath); + SetCellValue(row, columnNumber++, CellType.Numeric, player.KillPerRound); + SetCellValue(row, columnNumber++, CellType.Numeric, player.AssistPerRound); + SetCellValue(row, columnNumber++, CellType.Numeric, player.DeathPerRound); + SetCellValue(row, columnNumber++, CellType.Numeric, player.AverageHealthDamage); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TotalDamageHealthCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TotalDamageArmorCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.FiveKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.FourKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.ThreeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TwoKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.OneKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TradeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.TradeDeathCount); + SetCellValue(row, columnNumber++, CellType.Boolean, player.CrouchKillCount); + SetCellValue(row, columnNumber++, CellType.Boolean, player.JumpKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1WonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1LossCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V1WonPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2WonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2LossCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V2WonPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3WonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3LossCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V3WonPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4WonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4LossCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V4WonPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5Count); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5WonCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5LossCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.Clutch1V5WonPercent); + SetCellValue(row, columnNumber++, CellType.Numeric, player.FlashbangThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.SmokeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.HeGrenadeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.DecoyThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.MolotovThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, player.IncendiaryThrownCount); + SetCellValue(row, columnNumber++, CellType.Boolean, player.IsVacBanned); + SetCellValue(row, columnNumber, CellType.Boolean, player.IsOverwatchBanned); - rowNumber++; - } - }); + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/Sheets/Single/RoundsSheet.cs b/Services/Concrete/Excel/Sheets/Single/RoundsSheet.cs index 5a65b8e2f..94936a08a 100644 --- a/Services/Concrete/Excel/Sheets/Single/RoundsSheet.cs +++ b/Services/Concrete/Excel/Sheets/Single/RoundsSheet.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using Core.Models; using NPOI.SS.UserModel; @@ -50,60 +49,49 @@ public RoundsSheet(IWorkbook workbook, Demo demo) Sheet = workbook.CreateSheet("Rounds"); } - protected override async Task GenerateContent() + protected override void GenerateContent() { - var rowNumber = 1; - - await Task.Factory.StartNew(() => + int rowNumber = 1; + foreach (Round round in Demo.Rounds) { - // TODO fix it - RoundService roundService = new RoundService(); - foreach (Round round in Demo.Rounds) - { - //if (Properties.Settings.Default.SelectedPlayerSteamId != 0) - //{ - // await roundService.MapRoundValuesToSelectedPlayer(Demo, round, Properties.Settings.Default.SelectedPlayerSteamId); - //} - - IRow row = Sheet.CreateRow(rowNumber); - int columnNumber = 0; - SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); - SetCellValue(row, columnNumber++, CellType.Numeric, round.Tick); - SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(round.Duration, 2)); - SetCellValue(row, columnNumber++, CellType.String, round.WinnerName); - SetCellValue(row, columnNumber++, CellType.String, round.WinnerSide.AsString()); - SetCellValue(row, columnNumber++, CellType.String, round.EndReason.AsString()); - SetCellValue(row, columnNumber++, CellType.String, round.Type.AsString()); - SetCellValue(row, columnNumber++, CellType.String, round.SideTrouble.AsString()); - SetCellValue(row, columnNumber++, CellType.String, round.TeamTroubleName != string.Empty ? round.TeamTroubleName : string.Empty); - SetCellValue(row, columnNumber++, CellType.Numeric, round.KillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.OneKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.TwoKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.ThreeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.FourKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.FiveKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.TradeKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.JumpKillCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.AverageHealthDamagePerPlayer); - SetCellValue(row, columnNumber++, CellType.Numeric, round.DamageHealthCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.DamageArmorCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.BombExplodedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.BombPlantedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.BombDefusedCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.StartMoneyTeamCt); - SetCellValue(row, columnNumber++, CellType.Numeric, round.StartMoneyTeamT); - SetCellValue(row, columnNumber++, CellType.Numeric, round.EquipementValueTeamCt); - SetCellValue(row, columnNumber++, CellType.Numeric, round.EquipementValueTeamT); - SetCellValue(row, columnNumber++, CellType.Numeric, round.FlashbangThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.SmokeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.HeGrenadeThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.DecoyThrownCount); - SetCellValue(row, columnNumber++, CellType.Numeric, round.MolotovThrownCount); - SetCellValue(row, columnNumber, CellType.Numeric, round.IncendiaryThrownCount); + IRow row = Sheet.CreateRow(rowNumber); + int columnNumber = 0; + SetCellValue(row, columnNumber++, CellType.Numeric, round.Number); + SetCellValue(row, columnNumber++, CellType.Numeric, round.Tick); + SetCellValue(row, columnNumber++, CellType.Numeric, Math.Round(round.Duration, 2)); + SetCellValue(row, columnNumber++, CellType.String, round.WinnerName); + SetCellValue(row, columnNumber++, CellType.String, round.WinnerSide.AsString()); + SetCellValue(row, columnNumber++, CellType.String, round.EndReason.AsString()); + SetCellValue(row, columnNumber++, CellType.String, round.Type.AsString()); + SetCellValue(row, columnNumber++, CellType.String, round.SideTrouble.AsString()); + SetCellValue(row, columnNumber++, CellType.String, round.TeamTroubleName != string.Empty ? round.TeamTroubleName : string.Empty); + SetCellValue(row, columnNumber++, CellType.Numeric, round.KillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.OneKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.TwoKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.ThreeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.FourKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.FiveKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.TradeKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.JumpKillCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.AverageHealthDamagePerPlayer); + SetCellValue(row, columnNumber++, CellType.Numeric, round.DamageHealthCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.DamageArmorCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.BombExplodedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.BombPlantedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.BombDefusedCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.StartMoneyTeamCt); + SetCellValue(row, columnNumber++, CellType.Numeric, round.StartMoneyTeamT); + SetCellValue(row, columnNumber++, CellType.Numeric, round.EquipementValueTeamCt); + SetCellValue(row, columnNumber++, CellType.Numeric, round.EquipementValueTeamT); + SetCellValue(row, columnNumber++, CellType.Numeric, round.FlashbangThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.SmokeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.HeGrenadeThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.DecoyThrownCount); + SetCellValue(row, columnNumber++, CellType.Numeric, round.MolotovThrownCount); + SetCellValue(row, columnNumber, CellType.Numeric, round.IncendiaryThrownCount); - rowNumber++; - } - }); + rowNumber++; + } } } } diff --git a/Services/Concrete/Excel/SingleExport.cs b/Services/Concrete/Excel/SingleExport.cs index 5a36f2534..07107ebb7 100644 --- a/Services/Concrete/Excel/SingleExport.cs +++ b/Services/Concrete/Excel/SingleExport.cs @@ -90,43 +90,43 @@ public override async Task Generate() } _generalSheet = new GeneralSheet(Workbook, demo); - await _generalSheet.Generate(); + _generalSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _playersSheet = new PlayersSheet(Workbook, demo); - await _playersSheet.Generate(); + _playersSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _roundsSheet = new RoundsSheet(Workbook, demo); - await _roundsSheet.Generate(); + _roundsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _killsSheet = new KillsSheet(Workbook, demo); - await _killsSheet.Generate(); + _killsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryHoldKillsRoundSheet = new EntryHoldKillsRoundSheet(Workbook, demo); - await _entryHoldKillsRoundSheet.Generate(); + _entryHoldKillsRoundSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryHoldKillsPlayerSheet = new EntryHoldKillsPlayerSheet(Workbook, demo); - await _entryHoldKillsPlayerSheet.Generate(); + _entryHoldKillsPlayerSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryHoldKillsTeamSheet = new EntryHoldKillsTeamSheet(Workbook, demo); - await _entryHoldKillsTeamSheet.Generate(); + _entryHoldKillsTeamSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryKillsRoundSheet = new EntryKillsRoundSheet(Workbook, demo); - await _entryKillsRoundSheet.Generate(); + _entryKillsRoundSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryKillsPlayerSheet = new EntryKillsPlayerSheet(Workbook, demo); - await _entryKillsPlayerSheet.Generate(); + _entryKillsPlayerSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _entryKillsTeamSheet = new EntryKillsTeamSheet(Workbook, demo); - await _entryKillsTeamSheet.Generate(); + _entryKillsTeamSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _killMatrixSheet = new KillMatrixSheet(Workbook, demo); - await _killMatrixSheet.Generate(); + _killMatrixSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _flashMatrixPlayersSheet = new FlashMatrixPlayersSheet(Workbook, demo); - await _flashMatrixPlayersSheet.Generate(); + _flashMatrixPlayersSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); _flashMatrixTeamsSheet = new FlashMatrixTeamsSheet(Workbook, demo); - await _flashMatrixTeamsSheet.Generate(); + _flashMatrixTeamsSheet.Generate(); cancellationToken.ThrowIfCancellationRequested(); return Workbook;