diff options
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs')
-rw-r--r-- | src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs index 40691a3e..9c7082c9 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Globalization; @@ -32,13 +32,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands /// <param name="index">The zero-based index of the element to get.</param> public string this[int index] => this.Args[index]; - /// <summary>A method which parses a string argument into the given value.</summary> - /// <typeparam name="T">The expected argument type.</typeparam> - /// <param name="input">The argument to parse.</param> - /// <param name="output">The parsed value.</param> - /// <returns>Returns whether the argument was successfully parsed.</returns> - public delegate bool ParseDelegate<T>(string input, out T output); - /********* ** Public methods @@ -114,19 +107,6 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands return true; } - public bool IsDecimal(int index) - { - if (!this.TryGet(index, "", out string raw, false)) - return false; - - if (!decimal.TryParse(raw, NumberStyles.Number, CultureInfo.InvariantCulture, out decimal value)) - { - return false; - } - - return true; - } - /// <summary>Try to read a decimal argument.</summary> /// <param name="index">The argument index.</param> /// <param name="name">The argument name for error messages.</param> |