/// <inheritdoc/> public override void VisitShortOption( ParseKit kit, Builder builder, [Unused] Queue <char> shortNameQueue, [Unused] Queue <string> queue) { builder.AddOption(() => kit, this); }
/// <inheritdoc/> public override void VisitLongOption( ParseKit kit, Builder builder, string?arguemnt, [Unused] Queue <string> queue) { if (!(arguemnt is null)) { throw kit.NewUnableToGetArgument(); } builder.AddOption(() => kit, this); }
private void AddOptionWithNextArgument( ParseKit kit, Builder builder, Queue <string> queue) { if (queue.Count == 0) { throw kit.NewMissingArgument(); } var argument = queue.Dequeue(); builder.AddRequiredArgumentOption(() => kit, this, argument); }
/// <inheritdoc/> public override void VisitLongOption( ParseKit kit, Builder builder, string?argument, Queue <string> queue) { if (argument is null) { AddOptionWithNextArgument(kit, builder, queue); return; } builder.AddRequiredArgumentOption(() => kit, this, argument); }
/// <inheritdoc/> public override void VisitShortOption( ParseKit kit, Builder builder, Queue <char> shortNameQueue, Queue <string> queue) { if (shortNameQueue.Count == 0) { AddOptionWithNextArgument(kit, builder, queue); return; } var argument = new string(shortNameQueue.ToArray()); shortNameQueue.Clear(); builder.AddRequiredArgumentOption(() => kit, this, argument); }
/// <inheritdoc/> public abstract void VisitShortOption( ParseKit kit, Builder builder, Queue <char> shortNameQueue, Queue <string> queue);
/// <inheritdoc/> public abstract void VisitLongOption( ParseKit kit, Builder builer, string?argument, Queue <string> queue);