Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion libraries/botbuilder-dialogs/botbuilder/dialogs/dialog_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,31 @@
from typing import List
from .dialog_instance import DialogInstance


class DialogState:
"""
Contains state information for the dialog stack.
"""
def __init__(self, stack: List[DialogInstance] = None):
"""
Initializes a new instance of the :class:`DialogState` class.
The new instance is created with an empty dialog stack.

:param stack: The state information to initialize the stack with.
:type stack: List[:class:`DialogInstance`]
"""
if stack is None:
self._dialog_stack = []
else:
self._dialog_stack = stack

@property
def dialog_stack(self):
"""
Initializes a new instance of the :class:`DialogState` class.

:return: The state information to initialize the stack with.
:rtype: List
"""
return self._dialog_stack

def __str__(self):
Expand Down