Class ServiceParameter
- Namespace
- SharpConsoleUI.Plugins
- Assembly
- SharpConsoleUI.dll
Metadata describing a parameter for a service operation.
public record ServiceParameter : IEquatable<ServiceParameter>
- Inheritance
-
ServiceParameter
- Implements
- Inherited Members
Constructors
ServiceParameter(string, Type, bool, object?, string?)
Metadata describing a parameter for a service operation.
public ServiceParameter(string Name, Type Type, bool Required, object? DefaultValue = null, string? Description = null)
Parameters
NamestringThe parameter name (used as dictionary key in Execute calls)
TypeTypeThe expected type of the parameter value
RequiredboolWhether this parameter is required (true) or optional (false)
DefaultValueobjectThe default value used when the parameter is not provided (for optional parameters)
DescriptionstringHuman-readable description of what the parameter controls
Properties
DefaultValue
The default value used when the parameter is not provided (for optional parameters)
public object? DefaultValue { get; init; }
Property Value
Description
Human-readable description of what the parameter controls
public string? Description { get; init; }
Property Value
Name
The parameter name (used as dictionary key in Execute calls)
public string Name { get; init; }
Property Value
Required
Whether this parameter is required (true) or optional (false)
public bool Required { get; init; }
Property Value
Type
The expected type of the parameter value
public Type Type { get; init; }