-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogState.cs
More file actions
46 lines (39 loc) · 951 Bytes
/
DialogState.cs
File metadata and controls
46 lines (39 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace NumericOverflow.Bot.Models
{
public class DialogState
{
public List<DialogStepState> Steps { get; set; }
// To be set by the dispatcher
public DialogStepState CurrentState { get; set; }
public DialogStepState PreviousState { get; set; }
public DialogStepState NextState { get; set; }
public DialogState()
{
this.Steps = new List<DialogStepState>();
}
public void AddStep(DialogStepState dialogStepState)
{
Steps.Add(dialogStepState);
}
public void AddSteps(IEnumerable<DialogStepState> dialogStepState)
{
Steps.AddRange(dialogStepState);
}
public void RemoveStep(DialogStepState dialogStepState)
{
Steps.Remove(dialogStepState);
}
public IEnumerable<DialogStepState> GetSteps()
{
return this.Steps;
}
public DialogStepState GetLastStep()
{
return this.Steps.Last();
}
}
}