Class SkillActionAttribute
- Namespace
- nanoFramework.WebServer.Skills
- Assembly
- nanoFramework.WebServer.Skills.dll
Marks a static method as an invokable action within a skill.
[AttributeUsage(AttributeTargets.Method)]
public class SkillActionAttribute : Attribute
- Inheritance
-
SkillActionAttribute
- Inherited Members
- Extension Methods
Constructors
SkillActionAttribute(string, string, string, string)
Initializes a new instance of the SkillActionAttribute class.
public SkillActionAttribute(string name, string description = "", string outputDescription = "", string contentType = "application/json")
Parameters
namestringThe name of the action.
descriptionstringThe description of the action.
outputDescriptionstringThe description of the action's output.
contentTypestringThe MIME type of the output. Defaults to "application/json".
Properties
ContentType
Gets the MIME type of the output. Defaults to "application/json". Set to "text/markdown" for actions that return markdown documents.
public string ContentType { get; }
Property Value
Description
Gets the description of the action.
public string Description { get; }
Property Value
Name
Gets the name of the action.
public string Name { get; }
Property Value
OutputDescription
Gets the description of the action's output.
public string OutputDescription { get; }