Add parameter value provider support

Adds support for parameter value providers which makes it
possible to set custom values for parameters.
This commit is contained in:
Patrik Svensson
2021-05-08 07:42:28 +02:00
committed by Phil Scott
parent d1d94cdebe
commit 1dd1945297
14 changed files with 208 additions and 27 deletions

View File

@ -1,3 +1,5 @@
using System;
namespace Spectre.Console.Cli
{
/// <summary>
@ -9,12 +11,17 @@ namespace Spectre.Console.Cli
/// Gets the property name.
/// </summary>
/// <value>The property name.</value>
public abstract string PropertyName { get; }
public string PropertyName { get; }
/// <summary>
/// Gets the parameter type.
/// </summary>
public Type ParameterType { get; }
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public abstract string? Description { get; }
public string? Description { get; }
}
}