Add MkvEditCommand

This commit is contained in:
2022-03-18 09:32:47 +01:00
parent df86aee35f
commit d2391b95b3
2 changed files with 129 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
namespace MkvPropEditWrapper.Shared;
public static class MkvExtensions
{
public static bool FromFlagBoolean(this string value) => value switch
{
"1" => true,
"0" => false,
_ => throw new ArgumentException("Value must be '0' or '1'", nameof(value))
};
public static string ToFlagBoolean(this bool value) => value ? "1" : "0";
}