-
Notifications
You must be signed in to change notification settings - Fork 0
Template Exit
NebelFox edited this page Feb 20, 2022
·
1 revision
verbox.json
{
"boxes": {
"main": {
"commands": [
{
"name": "exit",
"brief": "terminates the application"
}
]
}
}
}
Program.cs
var serializer = new Serializer();
serializer.Deserialize("verbox.json");
BoxBuilder builder = serializer.Boxes["main"];
builder.SetActionsByPaths(new Dictionary<string, Action<Context>>
{
["exit"] = context => context.Box.Terminate()
});
builder.Build()
.StartDialogue();
new BoxBuilder()
.Command(new Command("exit", "terminates the application")
.Action(context => context.Box.Terminate()))
.Build()
.StartDialogue();
- General:
- File Specification:
- Templates:
- Tips