forked from imkindaprogrammermyself/Replays-Unpack-CS
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
using Nodsoft.WowsReplaysUnpack.Console.Samples.EntitySerializer; | ||
using Nodsoft.WowsReplaysUnpack.Console.Tests; | ||
|
||
// await new SyncTest().ExecuteAsync(); | ||
await new EntitySerializerSample().ExecuteAsync(); | ||
//await new EntitySerializerSample().ExecuteAsync(); | ||
new BrokenReplayTests().Execute(); |
27 changes: 27 additions & 0 deletions
27
Nodsoft.WowsReplaysUnpack.Console/Tests/BrokenReplayTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Nodsoft.WowsReplaysUnpack.Services; | ||
using System.IO; | ||
|
||
namespace Nodsoft.WowsReplaysUnpack.Console.Tests; | ||
|
||
public class BrokenReplayTests | ||
{ | ||
public void Execute() | ||
{ | ||
var services = new ServiceCollection(); | ||
services.AddLogging(); | ||
services.AddWowsReplayUnpacker(); | ||
var sp = services.BuildServiceProvider(); | ||
|
||
var path = @"E:\Downloads\20241104_185414_PWSB719-Niord_19_OC_prey.wowsreplay"; | ||
// var path = | ||
// @"E:\Downloads\5915c052ee734ef68f0b6b0065a0fe52-20241027_003342_PHSD509-Groningen_45_Zigzag.wowsreplay"; | ||
var fs = File.OpenRead(path); | ||
|
||
var replay = sp.GetRequiredService<IReplayUnpackerFactory>() | ||
.GetUnpacker() | ||
.Unpack(fs); | ||
|
||
System.Console.WriteLine(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters