Skip to content

Conversation

@Sushisource
Copy link
Member

What was changed

Title

Why?

Convenience functionality since there's no built-in take function or similar in .NET for async iterators

Checklist

  1. Closes [Feature Request] ReplayWorkflowsAsync should take limit parameter #332

  2. How was this tested:
    Added test

  3. Any docs updates needed?

foreach (var exec in resp.Executions)
{
if (input.Options != null && input.Options.Limit > 0 &&
yielded++ >= input.Options.Limit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the biggest fan of side effects in conditionals like this since postfix increment operator precedence is not always easy for a code reader to understand, but not a blocker.

@Sushisource Sushisource merged commit 66436bf into main Dec 6, 2024
8 checks passed
@Sushisource Sushisource deleted the list-workflows-limit branch December 6, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] ReplayWorkflowsAsync should take limit parameter

3 participants