mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-24 04:02:50 +08:00
Fix typos in code comments
This commit is contained in:
parent
c3510f3036
commit
d34012cad0
@ -8,7 +8,7 @@ using Spectre.Console.Cli;
|
|||||||
* This works around the chicken and egg situation with configuring serilog via the command line.
|
* This works around the chicken and egg situation with configuring serilog via the command line.
|
||||||
* The logger needs to be configured prior to executing the parser, but the logger needs the parsed values
|
* The logger needs to be configured prior to executing the parser, but the logger needs the parsed values
|
||||||
* to be configured. By using serilog.sinks.map we can defer configuration. We use a LogLevelSwitch to control the
|
* to be configured. By using serilog.sinks.map we can defer configuration. We use a LogLevelSwitch to control the
|
||||||
* logging levels dynamically, and then we use a serilog enricher that has it's state populated via a
|
* logging levels dynamically, and then we use a serilog enricher that has its state populated via a
|
||||||
* Spectre.Console CommandInterceptor
|
* Spectre.Console CommandInterceptor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ using System;
|
|||||||
namespace Spectre.Console.Cli
|
namespace Spectre.Console.Cli
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An base class attribute used for parameter validation.
|
/// A base class attribute used for parameter validation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="Attribute" />
|
/// <seealso cref="Attribute" />
|
||||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
|
||||||
|
@ -3,7 +3,7 @@ using System;
|
|||||||
namespace Spectre.Console.Cli
|
namespace Spectre.Console.Cli
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An base class attribute used for parameter completion.
|
/// A base class attribute used for parameter completion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="Attribute" />
|
/// <seealso cref="Attribute" />
|
||||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||||||
|
@ -32,7 +32,7 @@ namespace Spectre.Console.Cli
|
|||||||
var validationResult = validator.Validate(context);
|
var validationResult = validator.Validate(context);
|
||||||
if (!validationResult.Successful)
|
if (!validationResult.Successful)
|
||||||
{
|
{
|
||||||
// If there is a error message specified in the parameter validator attribute,
|
// If there is an error message specified in the parameter validator attribute,
|
||||||
// then use that one, otherwise use the validation result.
|
// then use that one, otherwise use the validation result.
|
||||||
var result = string.IsNullOrWhiteSpace(validator.ErrorMessage)
|
var result = string.IsNullOrWhiteSpace(validator.ErrorMessage)
|
||||||
? validationResult
|
? validationResult
|
||||||
|
@ -134,13 +134,13 @@ namespace Spectre.Console
|
|||||||
|
|
||||||
if (Mode == SelectionMode.Leaf)
|
if (Mode == SelectionMode.Leaf)
|
||||||
{
|
{
|
||||||
// Select the node and all it's children
|
// Select the node and all its children
|
||||||
foreach (var item in current.Traverse(includeSelf: true))
|
foreach (var item in current.Traverse(includeSelf: true))
|
||||||
{
|
{
|
||||||
item.IsSelected = select;
|
item.IsSelected = select;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visit every parent and evaluate if it's selection
|
// Visit every parent and evaluate if its selection
|
||||||
// status need to be updated
|
// status need to be updated
|
||||||
var parent = current.Parent;
|
var parent = current.Parent;
|
||||||
while (parent != null)
|
while (parent != null)
|
||||||
|
@ -5,7 +5,7 @@ namespace Spectre.Console.Rendering
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents something renderable that's reconstructed
|
/// Represents something renderable that's reconstructed
|
||||||
/// when it's state change in any way.
|
/// when its state change in any way.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class JustInTimeRenderable : Renderable
|
public abstract class JustInTimeRenderable : Renderable
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ namespace Spectre.Console
|
|||||||
public string? Link { get; }
|
public string? Link { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an <see cref="Style"/> with the
|
/// Gets a <see cref="Style"/> with the
|
||||||
/// default colors and without text decoration.
|
/// default colors and without text decoration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Style Plain { get; } = new Style();
|
public static Style Plain { get; } = new Style();
|
||||||
|
@ -107,7 +107,7 @@ namespace Spectre.Console
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Does it fit on it's own line?
|
// Does it fit on its own line?
|
||||||
if (width < maxWidth)
|
if (width < maxWidth)
|
||||||
{
|
{
|
||||||
// Flush the line
|
// Flush the line
|
||||||
|
@ -19,7 +19,7 @@ namespace Spectre.Console
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the width of the column.
|
/// Gets or sets the width of the column.
|
||||||
/// If <c>null</c>, the column will adapt to it's contents.
|
/// If <c>null</c>, the column will adapt to its contents.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Width
|
public int? Width
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ namespace Spectre.Console
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the width of the column.
|
/// Gets or sets the width of the column.
|
||||||
/// If <c>null</c>, the column will adapt to it's contents.
|
/// If <c>null</c>, the column will adapt to its contents.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Width { get; set; }
|
public int? Width { get; set; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user