Table of Contents

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

Name string

The parameter name (used as dictionary key in Execute calls)

Type Type

The expected type of the parameter value

Required bool

Whether this parameter is required (true) or optional (false)

DefaultValue object

The default value used when the parameter is not provided (for optional parameters)

Description string

Human-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

object

Description

Human-readable description of what the parameter controls

public string? Description { get; init; }

Property Value

string

Name

The parameter name (used as dictionary key in Execute calls)

public string Name { get; init; }

Property Value

string

Required

Whether this parameter is required (true) or optional (false)

public bool Required { get; init; }

Property Value

bool

Type

The expected type of the parameter value

public Type Type { get; init; }

Property Value

Type