Created
June 22, 2025 08:11
-
-
Save badsyntax/c7b7adf33a1fb8863915e0ca602aaa7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var whileRow = new Sequence() | |
{ | |
Activities = [ | |
new Inline((context) => | |
{ | |
var enumerator = context.Get<IAsyncEnumerator<string>>(csvEnumerator)!; | |
var currentCsvRow = enumerator.Current; | |
Console.WriteLine(currentCsvRow); | |
}), | |
new Inline(async (context) => { | |
var commitStateHandler = context.GetRequiredService<ICommitStateHandler>(); | |
var workflowStateExtractor = context.GetRequiredService<IWorkflowStateExtractor>(); | |
var workflowState = workflowStateExtractor.Extract(context.WorkflowExecutionContext); | |
await commitStateHandler.CommitAsync(context.WorkflowExecutionContext, workflowState); | |
}) | |
] | |
}; | |
var whileActivity = new While(async (context) => | |
{ | |
var enumerator = context.Get<IAsyncEnumerator<string>>(csvEnumerator)!; | |
return await enumerator.MoveNextAsync(); | |
}) | |
{ | |
Body = whileRow | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment