Table of Contents

Class ParamDefinitionAttribute

Namespace
Invex.Atom.Build.Params
Assembly
Invex.Atom.Build.dll

Defines a parameter for a build target, specifying its command-line name, description, and resolution sources.

[AttributeUsage(AttributeTargets.Property)]
public sealed class ParamDefinitionAttribute : ParamDefinitionAttributeBase
Inheritance
object
Attribute
ParamDefinitionAttribute
Inherited Members

Examples

public interface IMyTarget
{
    [ParamDefinition("my-param", "A description of my parameter.")]
    string MyParam => GetParam(() => MyParam);
}

Remarks

This attribute is used on properties within target definition interfaces to declare parameters. For sensitive values, use SecretDefinitionAttribute instead.

Constructors

ParamDefinitionAttribute(string, string, ParamSource, string[]?)

Initializes a new instance of the ParamDefinitionAttribute class.

public ParamDefinitionAttribute(string argName, string description, ParamSource sources = ParamSource.All, string[]? chainedParams = null)

Parameters

argName string

The name of the parameter on the command line (e.g., "my-param").

description string

A description of the parameter for help text.

sources ParamSource

The sources from which the parameter can be resolved.

chainedParams string[]

An array of other parameters that this parameter depends on.