AnswerAttribute
Declares an interactive answer slot on a command handler method. Equivalent to calling WithAnswer(string, string, string?) in the fluent API.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/Parameters/Attributes/AnswerAttribute.cs
Signature
Section titled “Signature”[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]public sealed class AnswerAttribute : AttributeInheritance
Section titled “Inheritance”Constructors
Section titled “Constructors”AnswerAttribute(string, string)
Section titled “AnswerAttribute(string, string)”Declares an interactive answer slot on a command handler method. Equivalent to calling WithAnswer(string, string, string?) in the fluent API.
public AnswerAttribute(string name, string type = "string")Parameters
Section titled “Parameters”Properties
Section titled “Properties”Description
Section titled “Description”Optional description for help text and agent tool schemas.
public string? Description { get; set; }Returns
Section titled “Returns”Answer name (matches the name parameter in AskConfirmationAsync, etc.).
public string Name { get; }Returns
Section titled “Returns”Value type using route constraint names: string, bool, int, etc.
public string Type { get; }