Skip to content

TextStudioTagParameterDefinition

ClassTextStudioTextStudio
public sealed class TextStudioTagParameterDefinition

Parameter name, aliases, type, requirement, defaults, examples, and suggestion metadata for a tag.

TextStudioTagParameterDefinition(string, TextStudioTagParameterKind, bool, int, string, string, string, string[], string[], string, string, float?, float?, float, string, bool)

Section titled “TextStudioTagParameterDefinition(string, TextStudioTagParameterKind, bool, int, string, string, string, string[], string[], string, string, float?, float?, float, string, bool)”
public TextStudioTagParameterDefinition(string name, TextStudioTagParameterKind kind = TextStudioTagParameterKind.String, bool required = false, int positionalIndex = -1, string displayName = null, string description = null, string suggestionKey = null, string[] allowedValues = null, string[] aliases = null, string defaultValue = null, string exampleValue = null, float? minimum = null, float? maximum = null, float snap = 0, string suffix = null, bool allowOverflow = false)

Creates a parameter schema with normalized names, aliases, examples, and suggestions.

Parameters

Name Type
name System.String
kind TextStudio.TextStudioTagParameterKind
required System.Boolean
positionalIndex System.Int32
displayName System.String
description System.String
suggestionKey System.String
allowedValues System.String[]
aliases System.String[]
defaultValue System.String
exampleValue System.String
minimum System.Nullable{System.Single}
maximum System.Nullable{System.Single}
snap System.Single
suffix System.String
allowOverflow System.Boolean

public bool MatchesName(string name)

Matches the canonical parameter name or an alias using ordinal case-insensitive comparison.

Parameters

Name Type
name System.String

Returns

System.Boolean

public string Name { get; }

Returns

System.String

public string DisplayName { get; }

Returns

System.String

public string Description { get; }

Returns

System.String

public TextStudioTagParameterKind Kind { get; }

Returns

TextStudio.TextStudioTagParameterKind

public bool Required { get; }

Returns

System.Boolean

public int PositionalIndex { get; }

Returns

System.Int32

public string SuggestionKey { get; }

Returns

System.String

public string DefaultValue { get; }

Returns

System.String

public string ExampleValue { get; }

Returns

System.String

public float? Minimum { get; }

Returns

System.Nullable{System.Single}

public float? Maximum { get; }

Returns

System.Nullable{System.Single}

public float Snap { get; }

Returns

System.Single

public string Suffix { get; }

Returns

System.String

public bool AllowOverflow { get; }

Returns

System.Boolean

public IReadOnlyList<string> AllowedValues { get; }

Returns

System.Collections.Generic.IReadOnlyList{System.String}

public IReadOnlyList<string> Aliases { get; }

Returns

System.Collections.Generic.IReadOnlyList{System.String}