Add Argument parser

This commit is contained in:
Mino 2020-03-29 22:20:30 +09:00
parent a90a5673f2
commit 693babc1e3
8 changed files with 87 additions and 15 deletions

View file

@ -13,14 +13,19 @@ namespace Dalamud.Bootstrap.SqexArg
m_dict = new Dictionary<string, string>();
}
public ArgumentBuilder(IEnumerable<KeyValuePair<string, string>> collection)
{
m_dict = new Dictionary<string, string>(collection);
}
/// <summary>
/// Creates an argument builder from the argument (e.g. /T =1234)
/// </summary>
/// <param name="argument"></param>
/// <returns></returns>
public static ArgumentBuilder Parse(string argument)
public static ArgumentBuilder Parse(ReadOnlySpan<char> argument)
{
throw new NotImplementedException("TODO");
return new ArgumentBuilder(ArgumentParser.Parse(argument));
}
public ArgumentBuilder Add(string key, string value)