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
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,44 @@

from .dialog_turn_status import DialogTurnStatus


class DialogTurnResult:
"""
Result returned to the caller of one of the various stack manipulation methods.

Use :meth:`DialogContext.end_dialogAsync()` to end a :class:`Dialog` and
return a result to the calling context.
"""
def __init__(self, status: DialogTurnStatus, result: object = None):
"""
:param status: The current status of the stack.
:type status: :class:`DialogTurnStatus`
:param result: The result returned by a dialog that was just ended.
:type result: object
"""
self._status = status
self._result = result

@property
def status(self):
return self._status
"""
Gets or sets the current status of the stack.

:return self._status:
:rtype self._status: :class:`DialogTurnStatus`
"""
return self._status

@property
def result(self):
"""
Final result returned by a dialog that just completed.

.. note::
This will only be populated in certain cases:
* The bot calls :meth:`DialogContext.begin_dialog()` to start a new dialog and the dialog ends immediately.
* The bot calls :meth:`DialogContext.continue_dialog()` and a dialog that was active ends.

:return self._result: Final result returned by a dialog that just completed.
:rtype self._result: object
"""
return self._result