mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add a remaining ListXML-specific objects
Also fixes the usage of some other objects, adds proper objects for certain cases, and adds a bunch of TODOs around the new objects. There will be a lot of overhauls needed to properly support things like Devices and Slots
This commit is contained in:
@@ -745,6 +745,36 @@ namespace SabreTools.Library.Tools
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Runnable value from input string
|
||||
/// </summary>
|
||||
/// <param name="runnable">String to get value from</param>
|
||||
/// <returns>Runnable value corresponding to the string</returns>
|
||||
public static Runnable AsRunnable(this string runnable)
|
||||
{
|
||||
#if NET_FRAMEWORK
|
||||
switch (runnable?.ToLowerInvariant())
|
||||
{
|
||||
case "no":
|
||||
return Runnable.No;
|
||||
case "partial":
|
||||
return Runnable.Partial;
|
||||
case "yes":
|
||||
return Runnable.Yes;
|
||||
default:
|
||||
return Runnable.NULL;
|
||||
}
|
||||
#else
|
||||
return runnable?.ToLowerInvariant() switch
|
||||
{
|
||||
"no" => Runnable.No,
|
||||
"partial" => Runnable.Partial,
|
||||
"yes" => Runnable.Yes,
|
||||
_ => Runnable.NULL,
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get SplitType value from input ForceMerging
|
||||
/// </summary>
|
||||
@@ -849,7 +879,6 @@ namespace SabreTools.Library.Tools
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get bool? value from input string
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user