mirror of
https://github.com/SabreTools/SabreTools.CommandLine.git
synced 2026-07-20 23:57:05 +00:00
Use "Format" instead of "Output" in some places
This commit is contained in:
@@ -137,7 +137,7 @@ namespace SabreTools.CommandLine
|
||||
|
||||
#endregion
|
||||
|
||||
#region Output
|
||||
#region Help Output
|
||||
|
||||
/// <summary>
|
||||
/// Output top-level features only
|
||||
@@ -155,7 +155,7 @@ namespace SabreTools.CommandLine
|
||||
output.Add("Available options:");
|
||||
foreach (var input in _inputs.Values)
|
||||
{
|
||||
var outputs = input.Output(pre: 2, midpoint: 30);
|
||||
var outputs = input.Format(pre: 2, midpoint: 30);
|
||||
if (outputs != null)
|
||||
output.AddRange(outputs);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ namespace SabreTools.CommandLine
|
||||
output.Add("Available options:");
|
||||
foreach (var input in _inputs.Values)
|
||||
{
|
||||
var outputs = input.OutputRecursive(0, pre: 2, midpoint: 30, includeLongDescription: true);
|
||||
var outputs = input.FormatRecursive(0, pre: 2, midpoint: 30, includeLongDescription: true);
|
||||
if (outputs != null)
|
||||
output.AddRange(outputs);
|
||||
}
|
||||
@@ -222,7 +222,7 @@ namespace SabreTools.CommandLine
|
||||
// Append the formatted text
|
||||
List<string> output = [];
|
||||
output.Add($"Available options for {featureName}:");
|
||||
output.AddRange(input.OutputRecursive(0, pre: 2, midpoint: 30, includeLongDescription: includeLongDescription));
|
||||
output.AddRange(input.FormatRecursive(0, pre: 2, midpoint: 30, includeLongDescription: includeLongDescription));
|
||||
|
||||
// Now write out everything in a staged manner
|
||||
WriteOutWithPauses(output);
|
||||
@@ -243,7 +243,7 @@ namespace SabreTools.CommandLine
|
||||
output.Add($"\"{featureName}\" not found. Did you mean:");
|
||||
foreach (string possible in startsWith)
|
||||
{
|
||||
output.AddRange(_inputs[possible].Output(pre: 2, midpoint: 30, includeLongDescription: includeLongDescription));
|
||||
output.AddRange(_inputs[possible].Format(pre: 2, midpoint: 30, includeLongDescription: includeLongDescription));
|
||||
}
|
||||
|
||||
// Now write out everything in a staged manner
|
||||
|
||||
@@ -610,7 +610,7 @@ namespace SabreTools.CommandLine.Inputs
|
||||
|
||||
#endregion
|
||||
|
||||
#region Output
|
||||
#region Help Output
|
||||
|
||||
/// <summary>
|
||||
/// Output this feature only
|
||||
@@ -618,7 +618,7 @@ namespace SabreTools.CommandLine.Inputs
|
||||
/// <param name="pre">Positive number representing number of spaces to put in front of the feature</param>
|
||||
/// <param name="midpoint">Positive number representing the column where the description should start</param>
|
||||
/// <param name="includeLongDescription">True if the long description should be formatted and output, false otherwise</param>
|
||||
public List<string> Output(int pre = 0, int midpoint = 0, bool includeLongDescription = false)
|
||||
public List<string> Format(int pre = 0, int midpoint = 0, bool includeLongDescription = false)
|
||||
{
|
||||
// Create the output list
|
||||
List<string> outputList = [];
|
||||
@@ -731,7 +731,7 @@ namespace SabreTools.CommandLine.Inputs
|
||||
/// <param name="pre">Positive number representing number of spaces to put in front of the feature</param>
|
||||
/// <param name="midpoint">Positive number representing the column where the description should start</param>
|
||||
/// <param name="includeLongDescription">True if the long description should be formatted and output, false otherwise</param>
|
||||
public List<string> OutputRecursive(int tabLevel, int pre = 0, int midpoint = 0, bool includeLongDescription = false)
|
||||
public List<string> FormatRecursive(int tabLevel, int pre = 0, int midpoint = 0, bool includeLongDescription = false)
|
||||
{
|
||||
// Create the output list
|
||||
List<string> outputList = [];
|
||||
@@ -851,7 +851,7 @@ namespace SabreTools.CommandLine.Inputs
|
||||
// Now let's append all subfeatures
|
||||
foreach (string feature in Children.Keys)
|
||||
{
|
||||
outputList.AddRange(Children[feature]!.OutputRecursive(tabLevel + 1, pre, midpoint, includeLongDescription));
|
||||
outputList.AddRange(Children[feature]!.FormatRecursive(tabLevel + 1, pre, midpoint, includeLongDescription));
|
||||
}
|
||||
|
||||
return outputList;
|
||||
|
||||
Reference in New Issue
Block a user