Update SabreTools.IO

This commit is contained in:
Matt Nadareski
2024-10-24 00:36:44 -04:00
parent ae4c8cd4c8
commit cf54891993
57 changed files with 521 additions and 1395 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using SabreTools.Logging;
namespace SabreTools.Core.Tools
{
@@ -8,23 +7,6 @@ namespace SabreTools.Core.Tools
{
#region String to Enum
/// <summary>
/// Get the LogLevel value for an input string, if possible
/// </summary>
/// <param name="value">String value to parse/param>
/// <returns></returns>
public static LogLevel AsLogLevel(this string? value)
{
return value?.ToLowerInvariant() switch
{
"verbose" => LogLevel.VERBOSE,
"user" => LogLevel.USER,
"warning" => LogLevel.WARNING,
"error" => LogLevel.ERROR,
_ => LogLevel.VERBOSE,
};
}
/// <summary>
/// Get bool? value from input string
/// </summary>