Skip to content

Commit

Permalink
Add --architecture flag to novadrop-dc schema.
Browse files Browse the repository at this point in the history
Part of #19.
  • Loading branch information
alexrp committed Jan 6, 2024
1 parent 738b96f commit 6c7bd6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/tools/dc.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ specifies the path of the directory to write inferred schemas to.
| - | - |
| `--decryption-key <key>` | Specifies a decryption key (defaults to the latest known key). |
| `--decryption-iv <iv>` | Specifies a decryption IV (defaults to the latest known IV). |
| `--architecture <architecture>` | Specifies the data center format architecture (defaults to `X64`). |
| `--strict` | Enables strict format compliance checks while reading the input file. |
| `--strategy <level>` | Specifies a schema inference strategy (defaults to `Conservative`). |
| `--subdirectories` | Enables using output subdirectories based on data sheet names. |
Expand Down
5 changes: 5 additions & 0 deletions src/tools/dc/Commands/SchemaCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public sealed class SchemaCommandSettings : CommandSettings
[TypeConverter(typeof(HexStringConverter))]
public ReadOnlyMemory<byte> DecryptionIV { get; init; } = DataCenter.LatestIV;

[CommandOption("--architecture <architecture>")]
[Description("Set format architecture")]
public DataCenterArchitecture Architecture { get; init; } = DataCenterArchitecture.X64;

[CommandOption("--strict")]
[Description("Enable strict verification")]
public bool Strict { get; init; }
Expand Down Expand Up @@ -80,6 +84,7 @@ This means that schemas generated from this command may reject modifications to
new DataCenterLoadOptions()
.WithKey(settings.DecryptionKey.Span)
.WithIV(settings.DecryptionIV.Span)
.WithArchitecture(settings.Architecture)
.WithStrict(settings.Strict)
.WithLoaderMode(DataCenterLoaderMode.Eager)
.WithMutability(DataCenterMutability.Immutable),
Expand Down

0 comments on commit 6c7bd6e

Please sign in to comment.