Return reference from interaction service methods
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
IInteractionService methods like PromptInputsAsync return a task that is completed with the result. There maybe scenarios where it's useful to have a reference to the interaction prompt before the result is returned.
### Describe the solution you'd like
`Task> PromptInputsAsync(...)` could be changed to `Interaction PromptInputs(...)`
And `Interaction` looks like this:
```cs
public sealed class Interaction
{
public Task> GetResultAsync()
public void Cancel()
public TaskAwaiter GetAwaiter()
public ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext)
}
```
Other methods would follow a similar pattern.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.