Skip to content

Commit

Permalink
Merge pull request #865 from Miepee/fsname
Browse files Browse the repository at this point in the history
CLI: Use c#10 + filescroped namespaces
  • Loading branch information
Grossley authored May 1, 2022
2 parents 3cbf811 + c8689fa commit b834bc5
Show file tree
Hide file tree
Showing 7 changed files with 1,746 additions and 1,675 deletions.
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

0 comments on commit b834bc5

Please sign in to comment.