mirror of
https://github.com/Syping/ragephoto-cli.git
synced 2025-12-04 16:51:48 +01:00
enforce code style with Boolean
This commit is contained in:
parent
c131a7532e
commit
4cc95309a2
3 changed files with 8 additions and 8 deletions
10
Commands.cs
10
Commands.cs
|
|
@ -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") {
|
||||
|
|
|
|||
2
Jpeg.cs
2
Jpeg.cs
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue