enforce code style with Boolean

This commit is contained in:
Syping 2025-11-23 06:22:48 +01:00
parent c131a7532e
commit 4cc95309a2
3 changed files with 8 additions and 8 deletions

View file

@ -53,8 +53,8 @@ internal static partial class Commands {
Description = "Path Command"
};
commandArgument.CompletionSources.Add(_ => [
new ("register"),
new ("unregister")]);
new("register"),
new("unregister")]);
commandArgument.Validators.Add(result => {
String[] commands = ["register", "unregister"];
String command = result.GetValueOrDefault<String>();

View file

@ -6,7 +6,7 @@ namespace RagePhoto.Cli;
internal static partial class Commands {
internal static Int32 CreateFunction(String format, String? imageFile, String? description,
String? json, String? title, String? outputFile, bool imageAsIs) {
String? json, String? title, String? outputFile, Boolean imageAsIs) {
try {
using Photo photo = new();
@ -159,7 +159,7 @@ internal static partial class Commands {
}
internal static Int32 SetFunction(String inputFile, String? format, String? imageFile, String? description,
String? json, String? title, bool updateJson, String? outputFile, bool imageAsIs) {
String? json, String? title, Boolean updateJson, String? outputFile, Boolean imageAsIs) {
try {
if (format == null && imageFile == null && description == null
&& json == null && title == null && !updateJson) {
@ -273,7 +273,7 @@ internal static partial class Commands {
Option<String?> outputOption = new("--output", "-o") {
Description = "Output File"
};
Option<bool> imageAsIsOption = new("--image-as-is") {
Option<Boolean> imageAsIsOption = new("--image-as-is") {
Description = "Force image being set as-is"
};
Command createCommand = new("create", "Create a new Photo") {
@ -362,13 +362,13 @@ internal static partial class Commands {
Option<String?> titleOption = new("--title", "-t") {
Description = "Title"
};
Option<bool> updateJsonOption = new("--update-json", "-u") {
Option<Boolean> updateJsonOption = new("--update-json", "-u") {
Description = "Update JSON"
};
Option<String?> outputOption = new("--output", "-o") {
Description = "Output File"
};
Option<bool> imageAsIsOption = new("--image-as-is") {
Option<Boolean> imageAsIsOption = new("--image-as-is") {
Description = "Force image being set as-is"
};
Command setCommand = new("set", "Set Data from a Photo") {

View file

@ -29,7 +29,7 @@ internal class Jpeg {
return jpegStream.ToArray();
}
internal static Byte[] GetJpeg(Stream input, bool imageAsIs, out Size size) {
internal static Byte[] GetJpeg(Stream input, Boolean imageAsIs, out Size size) {
try {
if (imageAsIs) {
using MemoryStream jpegStream = new();