diff --git a/.editorconfig b/.editorconfig index 9e9cc12..8232ce9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -131,7 +131,7 @@ csharp_style_throw_expression = true:warning csharp_style_conditional_delegate_call = true:warning ### Code-block preferences -csharp_prefer_braces = when_multiline:warning +csharp_prefer_braces = when_multiline:suggestion dotnet_diagnostic.SA1503.severity = warning # Doesn't follow above value csharp_prefer_simple_using_statement = true:suggestion csharp_style_prefer_tuple_swap = true:suggestion @@ -216,6 +216,7 @@ dotnet_diagnostic.IDE1006.severity = warning ### .NET SDK dotnet_diagnostic.CA1303.severity = none # We don't translate exception and log messages from English dotnet_diagnostic.SA1025.severity = none # Allow spaces in comments to structure info +dotnet_diagnostic.IDE0019.severity = suggestion # Use pattern matching dotnet_diagnostic.IDE0045.severity = suggestion # Simplify ifs dotnet_diagnostic.IDE0046.severity = suggestion # Simplify ifs dotnet_diagnostic.IDE0057.severity = suggestion # Slice can be simplified diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 91d132c..3dbabbf 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -11,9 +11,8 @@ on: tags: [ "v*" ] env: - DOTNET_VERSIONS: | - 8.0.420 - 10.0.202 + TEST_RESOURCES_NAME: 'resources-0.zip' + DOTNET_VERSIONS: 10.0.203 DOTNET_INSTALL_DIR: '/tmp/dotnet/' jobs: @@ -32,12 +31,28 @@ jobs: with: dotnet-version: ${{ env.DOTNET_VERSIONS }} + # Full test for master builds and PR of repo owners - name: "Build, test, and bundle" + if: ${{ env.TEST_RESOURCES_URI != '' }} run: > dotnet run build.cs -- --target=Default --target=Bundle --dotnet-configuration=Release + --resource-uri=${{ env.TEST_RESOURCES_URI }} + --resource-name=${{ env.TEST_RESOURCES_NAME }} + --resource-usr=${{ env.TEST_RESOURCES_USR }} + --resource-pwd=${{ env.TEST_RESOURCES_PWD }} + env: + TEST_RESOURCES_URI: ${{ secrets.TEST_RESOURCES_URI }} + TEST_RESOURCES_USR: ${{ secrets.TEST_RESOURCES_USR }} + TEST_RESOURCES_PWD: ${{ secrets.TEST_RESOURCES_PWD }} + + # Tests without resources for PR of external contributors + - name: "Build, test, and bundle" + if: ${{ env.TEST_RESOURCES_URI == '' }} + run: > + dotnet run build.cs -- --target=Default --target=Bundle --dotnet-configuration=Release - name: "Publish artifacts to CI" uses: actions/upload-artifact@v7 diff --git a/.idea/.idea.JUSToolkit/.idea/.gitignore b/.idea/.idea.JUSToolkit/.idea/.gitignore new file mode 100644 index 0000000..f7634cc --- /dev/null +++ b/.idea/.idea.JUSToolkit/.idea/.gitignore @@ -0,0 +1,15 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/.idea.JUSToolkit.iml +/contentModel.xml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.JUSToolkit/.idea/indexLayout.xml b/.idea/.idea.JUSToolkit/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.JUSToolkit/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.JUSToolkit/.idea/vcs.xml b/.idea/.idea.JUSToolkit/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/.idea.JUSToolkit/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/JUSToolkit.sln.DotSettings b/JUSToolkit.sln.DotSettings new file mode 100644 index 0000000..58e4866 --- /dev/null +++ b/JUSToolkit.sln.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/JUSToolkit.slnx b/JUSToolkit.slnx new file mode 100644 index 0000000..4594463 --- /dev/null +++ b/JUSToolkit.slnx @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/build.cs b/build.cs index 422ee7e..e8d715b 100644 --- a/build.cs +++ b/build.cs @@ -1,6 +1,6 @@ -#!/usr/bin/env dotnet run +#!/usr/bin/env dotnet run #:property PublishAot=false -#:package Cake.Frosting.PleOps.Recipe@1.0.4-preview.33 +#:package Cake.Frosting.PleOps.Recipe@1.0.4-preview.37 using System.Diagnostics.CodeAnalysis; using Cake.Common.IO; @@ -57,7 +57,7 @@ public override void Setup(BuildContext context, ISetupContext info) new ProjectPublicationInfo( "./src/JUS.CLI", [ "win-x64", "linux-x64", "osx-x64" ], - "net8.0")); + "net10.0")); context.ReadArguments(); @@ -108,11 +108,7 @@ public override bool ShouldRun(BuildContext context) => public override void Run(BuildContext context) { - string resourcesPath = Path.GetFullPath(Path.Combine("resources", "tests")); - if (Directory.Exists(resourcesPath)) { - context.Log.Information("Test files already exists, skipping download."); - return; - } + string resourcesPath = Path.GetFullPath(Path.Combine("src", "JUS.Tests")); string resourceUri = string.Format(context.TestResourceUri!, context.TestResourceName); var downloadSettings = new DownloadFileSettings { @@ -128,6 +124,6 @@ public override void Run(BuildContext context) var compressedResources = context.DownloadFile(resourceUri, downloadSettings); context.Log.Debug("Unzipping resource"); - context.Unzip(compressedResources, resourcesPath); + context.Unzip(compressedResources, resourcesPath, true); } } diff --git a/nuget.config b/nuget.config index 8292bd9..9cc47fe 100644 --- a/nuget.config +++ b/nuget.config @@ -14,7 +14,7 @@ - + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index d61b8e2..d3fb91f 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -1,24 +1,21 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/src/JUS.CLI/JUS.CLI.csproj b/src/JUS.CLI/JUS.CLI.csproj index 8014701..6200e3f 100644 --- a/src/JUS.CLI/JUS.CLI.csproj +++ b/src/JUS.CLI/JUS.CLI.csproj @@ -3,7 +3,7 @@ Exe - net8.0 + net10.0 diff --git a/src/JUS.SceneGatePlugin/JUS.SceneGatePlugin.csproj b/src/JUS.SceneGatePlugin/JUS.SceneGatePlugin.csproj new file mode 100644 index 0000000..3984ea7 --- /dev/null +++ b/src/JUS.SceneGatePlugin/JUS.SceneGatePlugin.csproj @@ -0,0 +1,21 @@ + + + + SceneGate UI plugin for the JUS game formats. + + net10.0 + + enable + enable + false + + + + + + + + + + + diff --git a/src/JUS.SceneGatePlugin/JusBinaryHeaderConverterMatcher.cs b/src/JUS.SceneGatePlugin/JusBinaryHeaderConverterMatcher.cs new file mode 100644 index 0000000..4b341b8 --- /dev/null +++ b/src/JUS.SceneGatePlugin/JusBinaryHeaderConverterMatcher.cs @@ -0,0 +1,88 @@ +using System.Diagnostics.CodeAnalysis; +using JUS.Tool.Containers.Converters; +using JUS.Tool.Graphics.Converters; +using SceneGate.UI.Formats.Discovery; +using Yarhl.FileSystem; +using Yarhl.IO; + +namespace JUS.SceneGatePlugin; + +[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] +public sealed class JusBinaryHeaderConverterMatcher : IConverterMatcher +{ + private static readonly HeaderFormat[] SupportedFormats = [ + // Containers + HeaderFormat.Create("ALAR", 2, null), + HeaderFormat.Create("ALAR", 3, null), + // Graphics + HeaderFormat.Create("ALMT", null, null), + HeaderFormat.Create("DSIG", null, null), + HeaderFormat.Create("DSTX", 1, 3), + HeaderFormat.Create("DSTX", 1, 4), + ]; + + public ConverterMatcherResult Match(Node input, ConverterMatcherContext context) + { + if (input.Format is not IBinary) { + return ConverterMatcherResult.Incompatible(); + } + + // Validate the header data + HeaderFormat? compatibleFormat = SupportedFormats + .FirstOrDefault(f => MatchFormat(context, f)); + if (compatibleFormat is null) { + return ConverterMatcherResult.Incompatible(); + } + + // header data match... validate this is a supported game + bool? compatibleSoftware = SupportedSoftware.IsFromCompatibleSoftware(input, out _); + if (compatibleSoftware == false) { + return ConverterMatcherResult.Incompatible(); + } + + // "should be" if header match, but we can't verify the game code + MatchingConfidence level = compatibleSoftware == true ? MatchingConfidence.Confident : MatchingConfidence.ShouldBe; + object converter = compatibleFormat.ConverterFactory(); + return new ConverterMatcherResult(level, compatibleFormat.ConverterType, converter); + } + + private static bool MatchFormat(ConverterMatcherContext context, HeaderFormat format) + { + int requiredHeaderData = format switch { + { Flags: not null } => 6, + { Version: not null } => 5, + _ => 4 + }; + if (context.Header.Length < requiredHeaderData) { + return false; + } + + if (context.Header.ReadAsciiString(0, 4) != format.Id) { + return false; + } + + if (format.Version.HasValue && context.Header.Span[4] != format.Version.Value) { + return false; + } + + if (format.Flags.HasValue && context.Header.Span[5] != format.Flags.Value) { + return false; + } + + return true; + } + + private sealed record HeaderFormat( + string Id, + byte? Version, + byte? Flags, + Type ConverterType, + Func ConverterFactory) + { + public static HeaderFormat Create(string id, byte? version, byte? flags) + where T : class, new() + { + return new HeaderFormat(id, version, flags, typeof(T), () => new T()); + } + } +} diff --git a/src/JUS.SceneGatePlugin/JusPathBinaryConverterMatcher.cs b/src/JUS.SceneGatePlugin/JusPathBinaryConverterMatcher.cs new file mode 100644 index 0000000..ab92445 --- /dev/null +++ b/src/JUS.SceneGatePlugin/JusPathBinaryConverterMatcher.cs @@ -0,0 +1,75 @@ +using System.Diagnostics.CodeAnalysis; +using JUS.Tool.Graphics.Converters; +using JUS.Tool.Texts.Converters; +using SceneGate.UI.Formats.Discovery; +using Yarhl.FileSystem; +using Yarhl.IO; + +namespace JUS.SceneGatePlugin; + +[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] +public sealed class JusPathBinaryConverterMatcher : IConverterMatcher +{ + private static readonly FormatLocation[] SupportedFiles = [ + // Graphics + FormatLocation.Create("data/bin/koma.bin"), + FormatLocation.Create("data/bin/kshape.bin"), + // Texts + FormatLocation.Create("data/bin/ability_t.bin"), + FormatLocation.Create("data/bin/bgm.bin"), + FormatLocation.Create("data/bin/chr_b_t.bin"), + FormatLocation.Create("data/bin/chr_s_t.bin"), + FormatLocation.Create("data/bin/clearlst.bin"), + FormatLocation.Create("data/bin/commwin.bin"), + FormatLocation.Create("data/bin/demo.bin"), + FormatLocation.Create("data/bin/infoname.bin"), + FormatLocation.Create("data/bin/komatxt.bin"), + FormatLocation.Create("data/bin/location.bin"), + FormatLocation.Create("data/bin/piece.bin"), + FormatLocation.Create("data/bin/pname.bin"), + FormatLocation.Create("data/bin/rulemess.bin"), + FormatLocation.Create("data/bin/stage.bin"), + FormatLocation.Create("data/bin/title.bin"), + FormatLocation.Create("data/deckmake/tutorial.bin"), + FormatLocation.Create("data/jgalaxy/jgalaxy.aar/jgalaxy/jgalaxy.bin"), + FormatLocation.Create("data/jgalaxy/jgalaxy.aar/jgalaxy/battle.bin"), + FormatLocation.Create("data/jgalaxy/jgalaxy.aar/jgalaxy/mission.bin"), + FormatLocation.Create("data/jquiz/jquiz_pack.aar/jquiz/jquiz.bin"), + ]; + + public ConverterMatcherResult Match(Node input, ConverterMatcherContext context) + { + if (input.Format is not IBinary) { + return ConverterMatcherResult.Incompatible(); + } + + // Check the game code and get the root node. + bool? compatibleSoftware = SupportedSoftware.IsFromCompatibleSoftware(input, out Node root); + if (compatibleSoftware == false) { + return ConverterMatcherResult.Incompatible(); + } + + // Build the relative path (once) and compare against support formats + // If we can't determine the nitrorom root, root will be the first node. + string relativePath = input.Path.Substring(root.Path.Length + 1); + FormatLocation? compatibleFormat = SupportedFiles + .FirstOrDefault(x => x.Path == relativePath); + if (compatibleFormat is null) { + return ConverterMatcherResult.Incompatible(); + } + + // "should be" if header match, but we can't verify the game code + MatchingConfidence level = compatibleSoftware == true ? MatchingConfidence.Confident : MatchingConfidence.ShouldBe; + object converter = compatibleFormat.ConverterFactory(); + return new ConverterMatcherResult(level, compatibleFormat.ConverterType, converter); + } + + private sealed record FormatLocation(string Path, Type ConverterType, Func ConverterFactory) + { + public static FormatLocation Create(string path) + where T : class, new() + { + return new FormatLocation(path, typeof(T), () => new T()); + } + } +} diff --git a/src/JUS.SceneGatePlugin/JusRegexPathBinaryConverterMatcher.cs b/src/JUS.SceneGatePlugin/JusRegexPathBinaryConverterMatcher.cs new file mode 100644 index 0000000..df191ec --- /dev/null +++ b/src/JUS.SceneGatePlugin/JusRegexPathBinaryConverterMatcher.cs @@ -0,0 +1,58 @@ +using System.Diagnostics.CodeAnalysis; +using System.Text.RegularExpressions; +using JUS.Tool.Texts.Converters; +using SceneGate.UI.Formats.Discovery; +using Yarhl.FileSystem; +using Yarhl.IO; + +namespace JUS.SceneGatePlugin; + +[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] +public sealed class JusRegexPathBinaryConverterMatcher : IConverterMatcher +{ + private static readonly FormatLocation[] SupportedFiles = [ + // Texts + FormatLocation.Create(@"data/battle/tutorial\d.bin"), + FormatLocation.Create(@"data/bin/InfoDeck.aar/bin/deck/\w{2}.bin"), + FormatLocation.Create(@"data/bin/InfoDeck.aar/bin/info/(\w{2}|jump).bin"), + FormatLocation.Create(@"data/deck/Deck\.aar/deck/\w+/\d{3}.bin"), + FormatLocation.Create(@"data/deck/Deck\.aar/deck/\w+/p\d{3}.bin"), + ]; + + public ConverterMatcherResult Match(Node input, ConverterMatcherContext context) + { + if (input.Format is not IBinary) { + return ConverterMatcherResult.Incompatible(); + } + + // Check the game code and get the root node. + bool? compatibleSoftware = SupportedSoftware.IsFromCompatibleSoftware(input, out Node root); + if (compatibleSoftware == false) { + return ConverterMatcherResult.Incompatible(); + } + + // Build the relative path (once) and match against support formats + // If we can't determine the nitrorom root, root will be the first node. + string relativePath = input.Path.Substring(root.Path.Length + 1); + FormatLocation? compatibleFormat = SupportedFiles + .FirstOrDefault(x => x.Regex.IsMatch(relativePath)); + if (compatibleFormat is null) { + return ConverterMatcherResult.Incompatible(); + } + + // "should be" if header match, but we can't verify the game code + MatchingConfidence level = compatibleSoftware == true ? MatchingConfidence.Confident : MatchingConfidence.ShouldBe; + object converter = compatibleFormat.ConverterFactory(); + return new ConverterMatcherResult(level, compatibleFormat.ConverterType, converter); + } + + private sealed record FormatLocation(Regex Regex, Type ConverterType, Func ConverterFactory) + { + public static FormatLocation Create(string pattern) + where T : class, new() + { + Regex regex = new(pattern, RegexOptions.Compiled); + return new FormatLocation(regex, typeof(T), () => new T()); + } + } +} diff --git a/src/JUS.SceneGatePlugin/SupportedSoftware.cs b/src/JUS.SceneGatePlugin/SupportedSoftware.cs new file mode 100644 index 0000000..c2ae2d9 --- /dev/null +++ b/src/JUS.SceneGatePlugin/SupportedSoftware.cs @@ -0,0 +1,24 @@ +using SceneGate.Ekona.Containers.Rom; +using Yarhl.FileSystem; + +namespace JUS.SceneGatePlugin; + +public static class SupportedSoftware +{ + public static string GameCode => "AJUJ"; + + public static bool? IsFromCompatibleSoftware(Node assetNode, out Node root) + { + ProgramInfo? info = GetProgramInfo(assetNode); + root = assetNode; + while (root.Parent is not null && info is null) { + root = root.Parent; + info = GetProgramInfo(root); + } + + return info is null ? null : GameCode == info.GameCode; + + static ProgramInfo? GetProgramInfo(Node node) => + node.Children["system"]?.Children["info"]?.Format as ProgramInfo; + } +} diff --git a/src/JUS.Tests/JUS.Tests.csproj b/src/JUS.Tests/JUS.Tests.csproj index c84113c..aaed41d 100644 --- a/src/JUS.Tests/JUS.Tests.csproj +++ b/src/JUS.Tests/JUS.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 false @@ -9,11 +9,17 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/JUS.Tool/JUS.Tool.csproj b/src/JUS.Tool/JUS.Tool.csproj index 4781fa1..7f2775f 100644 --- a/src/JUS.Tool/JUS.Tool.csproj +++ b/src/JUS.Tool/JUS.Tool.csproj @@ -3,7 +3,7 @@ true - net8.0 + net10.0 diff --git a/src/JUS.Tool/Texts/Converters/Binary2Deck.cs b/src/JUS.Tool/Texts/Converters/Binary2Deck.cs index d2ca8ac..f4cfd27 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2Deck.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2Deck.cs @@ -27,7 +27,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between Deck format and BinaryFormat. /// public class Binary2Deck : - IConverter, + IConverter, IConverter { /// @@ -36,7 +36,7 @@ public class Binary2Deck : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public Deck Convert(BinaryFormat source) + public Deck Convert(IBinary source) { if (source == null) { throw new ArgumentNullException(nameof(source)); diff --git a/src/JUS.Tool/Texts/Converters/Binary2InfoDeckDeck.cs b/src/JUS.Tool/Texts/Converters/Binary2InfoDeckDeck.cs index a115848..88b0ca4 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2InfoDeckDeck.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2InfoDeckDeck.cs @@ -27,7 +27,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between InfoDeckDeck format and BinaryFormat. /// public class Binary2InfoDeckDeck : - IConverter, + IConverter, IConverter { private DataReader reader = null!; @@ -38,7 +38,7 @@ public class Binary2InfoDeckDeck : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public InfoDeckDeck Convert(BinaryFormat source) + public InfoDeckDeck Convert(IBinary source) { ArgumentNullException.ThrowIfNull(source); diff --git a/src/JUS.Tool/Texts/Converters/Binary2InfoDeckInfo.cs b/src/JUS.Tool/Texts/Converters/Binary2InfoDeckInfo.cs index 1c2317a..24abcf1 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2InfoDeckInfo.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2InfoDeckInfo.cs @@ -27,7 +27,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between InfoDeckInfo format and BinaryFormat. /// public class Binary2InfoDeckInfo : - IConverter, + IConverter, IConverter { private DataReader reader = null!; @@ -38,7 +38,7 @@ public class Binary2InfoDeckInfo : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public InfoDeckInfo Convert(BinaryFormat source) + public InfoDeckInfo Convert(IBinary source) { ArgumentNullException.ThrowIfNull(source); diff --git a/src/JUS.Tool/Texts/Converters/Binary2JGalaxyComplex.cs b/src/JUS.Tool/Texts/Converters/Binary2JGalaxyComplex.cs index ffefa53..0c295e4 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2JGalaxyComplex.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2JGalaxyComplex.cs @@ -28,7 +28,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between JGalaxyComplex format and BinaryFormat. /// public class Binary2JGalaxyComplex : - IConverter, + IConverter, IConverter { private DataReader reader = null!; @@ -39,7 +39,7 @@ public class Binary2JGalaxyComplex : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public JGalaxyComplex Convert(BinaryFormat source) + public JGalaxyComplex Convert(IBinary source) { if (source == null) { throw new ArgumentNullException(nameof(source)); diff --git a/src/JUS.Tool/Texts/Converters/Binary2JGalaxySimple.cs b/src/JUS.Tool/Texts/Converters/Binary2JGalaxySimple.cs index c11e154..a14fd13 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2JGalaxySimple.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2JGalaxySimple.cs @@ -27,7 +27,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between JGalaxySimple format and BinaryFormat. /// public class Binary2JGalaxySimple : - IConverter, + IConverter, IConverter { private DataReader reader = null!; @@ -38,7 +38,7 @@ public class Binary2JGalaxySimple : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public JGalaxySimple Convert(BinaryFormat source) + public JGalaxySimple Convert(IBinary source) { if (source == null) { throw new ArgumentNullException(nameof(source)); diff --git a/src/JUS.Tool/Texts/Converters/Binary2JQuiz.cs b/src/JUS.Tool/Texts/Converters/Binary2JQuiz.cs index 5b7ba96..a7927c9 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2JQuiz.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2JQuiz.cs @@ -26,7 +26,7 @@ namespace JUS.Tool.Texts.Converters /// /// Converts between JQuiz format and BinaryFormat. /// - public class Binary2JQuiz : IConverter, IConverter + public class Binary2JQuiz : IConverter, IConverter { private DataReader reader = null!; @@ -36,7 +36,7 @@ public class Binary2JQuiz : IConverter, IConverterBinaryFormat to convert. /// Text format. /// Source file does not exist. - public JQuiz Convert(BinaryFormat source) + public JQuiz Convert(IBinary source) { if (source == null) { throw new ArgumentNullException(nameof(source)); diff --git a/src/JUS.Tool/Texts/Converters/Binary2PDeck.cs b/src/JUS.Tool/Texts/Converters/Binary2PDeck.cs index db0d13c..873b642 100644 --- a/src/JUS.Tool/Texts/Converters/Binary2PDeck.cs +++ b/src/JUS.Tool/Texts/Converters/Binary2PDeck.cs @@ -27,7 +27,7 @@ namespace JUS.Tool.Texts.Converters /// Converts between PDeck format and BinaryFormat. /// public class Binary2PDeck : - IConverter, + IConverter, IConverter { /// @@ -36,7 +36,7 @@ public class Binary2PDeck : /// BinaryFormat to convert. /// Text format. /// Source file does not exist. - public PDeck Convert(BinaryFormat source) + public PDeck Convert(IBinary source) { if (source == null) { throw new ArgumentNullException(nameof(source)); diff --git a/src/JUSToolkit.sln b/src/JUSToolkit.sln deleted file mode 100644 index a84beaf..0000000 --- a/src/JUSToolkit.sln +++ /dev/null @@ -1,67 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JUS.Tool", "JUS.Tool\JUS.Tool.csproj", "{07E6EBB9-380D-4813-AFCD-E5856501929A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JUS.CLI", "JUS.CLI\JUS.CLI.csproj", "{CB7B12D4-90B6-4564-8ECC-B6954E61A11F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JUS.Tests", "JUS.Tests\JUS.Tests.csproj", "{276997DA-06FC-4C8A-AA82-92C3373C69A3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build system", "Build system", "{BF9E80B5-BC37-4F7E-8A4A-DEF982318B94}" - ProjectSection(SolutionItems) = preProject - ..\build.cs = ..\build.cs - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|x64.ActiveCfg = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|x64.Build.0 = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|x86.ActiveCfg = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Debug|x86.Build.0 = Debug|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|Any CPU.Build.0 = Release|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|x64.ActiveCfg = Release|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|x64.Build.0 = Release|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|x86.ActiveCfg = Release|Any CPU - {07E6EBB9-380D-4813-AFCD-E5856501929A}.Release|x86.Build.0 = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|x64.ActiveCfg = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|x64.Build.0 = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|x86.ActiveCfg = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Debug|x86.Build.0 = Debug|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|Any CPU.Build.0 = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|x64.ActiveCfg = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|x64.Build.0 = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|x86.ActiveCfg = Release|Any CPU - {CB7B12D4-90B6-4564-8ECC-B6954E61A11F}.Release|x86.Build.0 = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|x64.ActiveCfg = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|x64.Build.0 = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Debug|x86.Build.0 = Debug|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|Any CPU.Build.0 = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|x64.ActiveCfg = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|x64.Build.0 = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|x86.ActiveCfg = Release|Any CPU - {276997DA-06FC-4C8A-AA82-92C3373C69A3}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal