[C#] refactor: return AdaptiveCardInvokeResponse for ActionExecute #673
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linked issues
closes: #601
Details
Change details
AdaptiveCardInvokeResponse
as return type ofActionExecuteHandler
. The change is because the original style cannot meet the following requirement: return values with different types in one handler. For example, if I'd like to return Adaptive Card or text message by some cases inOnActionExecute("verb")
, I have to defineOnActionExecute("verb", ActionExecuteAdaptiveCardHandler)
andOnActionExecute("verb", ActionExecuteTextHandler)
respectively. Although the two handlers will be hit, only one result will be returned. A concrete example isSubmitAction
in gptME sample.Attestation Checklist
My code follows the style guidelines of this project
I have checked for/fixed spelling, linting, and other errors
I have commented my code for clarity
I have made corresponding changes to the documentation (we use TypeDoc to document our code)
My changes generate no new warnings
I have added tests that validates my changes, and provides sufficient test coverage. I have tested with:
New and existing unit tests pass locally with my changes
Additional information