Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Use c#10 + filescroped namespaces #865

Merged
merged 1 commit into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions UndertaleModCli/CommandOptions/DumpOptions.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
using System.IO;

namespace UndertaleModCli
namespace UndertaleModCli;

/// <summary>
/// Cli options for the Dump command
/// </summary>
public class DumpOptions
{
/// <summary>
/// Cli options for the Dump command
/// File path to the data file
/// </summary>
public class DumpOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }
public FileInfo Datafile { get; set; }

/// <summary>
/// Directory path to where to dump all contents
/// </summary>
public DirectoryInfo? Output { get; set; }
/// <summary>
/// Directory path to where to dump all contents
/// </summary>
public DirectoryInfo? Output { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;

/// <summary>
/// Names of the code entries that should get dumped
/// </summary>
public string[] Code { get; set; }
/// <summary>
/// Names of the code entries that should get dumped
/// </summary>
public string[] Code { get; set; }

/// <summary>
/// Determines if strings should get dumped.
/// </summary>
public bool Strings { get; set; }
/// <summary>
/// Determines if strings should get dumped.
/// </summary>
public bool Strings { get; set; }

/// <summary>
/// Determines if embedded textures should get dumped
/// </summary>
public bool Textures { get; set; }
}
/// <summary>
/// Determines if embedded textures should get dumped
/// </summary>
public bool Textures { get; set; }
}
25 changes: 12 additions & 13 deletions UndertaleModCli/CommandOptions/InfoOptions.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
using System.IO;

namespace UndertaleModCli
namespace UndertaleModCli;

/// <summary>
/// Cli options for the Info command
/// </summary>
public class InfoOptions
{
/// <summary>
/// Cli options for the Info command
/// File path to the data file
/// </summary>
public class InfoOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }
public FileInfo Datafile { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
57 changes: 28 additions & 29 deletions UndertaleModCli/CommandOptions/LoadOptions.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
using System.IO;

namespace UndertaleModCli
namespace UndertaleModCli;

/// <summary>
/// Cli options for the Load command
/// </summary>
public class LoadOptions
{
/// <summary>
/// Cli options for the Load command
/// File path to the data file
/// </summary>
public class LoadOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }
public FileInfo Datafile { get; set; }

/// <summary>
/// File paths to the scripts that shall be run
/// </summary>
public FileInfo[] Scripts { get; set; }
/// <summary>
/// File paths to the scripts that shall be run
/// </summary>
public FileInfo[] Scripts { get; set; }

/// <summary>
/// C# string that shall be executed
/// </summary>
public string? Line { get; set; }
/// <summary>
/// C# string that shall be executed
/// </summary>
public string? Line { get; set; }

/// <summary>
/// File path to where to save the modified data file
/// </summary>
public FileInfo? Output { get; set; }
/// <summary>
/// File path to where to save the modified data file
/// </summary>
public FileInfo? Output { get; set; }

/// <summary>
/// Determines if Cli should be run in interactive mode
/// </summary>
public bool Interactive { get; set; } = false;
/// <summary>
/// Determines if Cli should be run in interactive mode
/// </summary>
public bool Interactive { get; set; } = false;

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
41 changes: 20 additions & 21 deletions UndertaleModCli/CommandOptions/NewOptions.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
using System.IO;

namespace UndertaleModCli
namespace UndertaleModCli;

/// <summary>
/// Cli options for the New command
/// </summary>
public class NewOptions
{
/// <summary>
/// Cli options for the New command
/// File path for new data file
/// </summary>
public class NewOptions
{
/// <summary>
/// File path for new data file
/// </summary>
public FileInfo Output { get; set; } = new FileInfo("data.win");
public FileInfo Output { get; set; } = new FileInfo("data.win");

/// <summary>
/// If the existing file path at <see cref="Output"/> should be overwritten
/// </summary>
public bool Overwrite { get; set; } = false;
/// <summary>
/// If the existing file path at <see cref="Output"/> should be overwritten
/// </summary>
public bool Overwrite { get; set; } = false;

/// <summary>
/// Whether to write the new data to Stdout
/// </summary>
public bool Stdout { get; set; }
/// <summary>
/// Whether to write the new data to Stdout
/// </summary>
public bool Stdout { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
}
49 changes: 24 additions & 25 deletions UndertaleModCli/CommandOptions/ReplaceOptions.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
using System.IO;

namespace UndertaleModCli
namespace UndertaleModCli;

/// <summary>
/// Cli options for the Replace command
/// </summary>
public class ReplaceOptions
{
/// <summary>
/// Cli options for the Replace command
/// File path to the data file
/// </summary>
public class ReplaceOptions
{
/// <summary>
/// File path to the data file
/// </summary>
public FileInfo Datafile { get; set; }
public FileInfo Datafile { get; set; }

/// <summary>
/// File path to where to save the modified data file
/// </summary>
public FileInfo? Output { get; set; }
/// <summary>
/// File path to where to save the modified data file
/// </summary>
public FileInfo? Output { get; set; }

/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;
/// <summary>
/// Determines if Cli should print out verbose logs
/// </summary>
public bool Verbose { get; set; } = false;

/// <summary>
/// Equal separated values of code entry and the file to replace the code entry with.
/// </summary>
public string[] Code { get; set; }
/// <summary>
/// Equal separated values of code entry and the file to replace the code entry with.
/// </summary>
public string[] Code { get; set; }

/// <summary>
/// Equal separated values of embedded texture and the file to replace the embedded texture with.
/// </summary>
public string[] Textures { get; set; }
}
/// <summary>
/// Equal separated values of embedded texture and the file to replace the embedded texture with.
/// </summary>
public string[] Textures { get; set; }
}
Loading