Skip to content

DeclarativeWorkflowProgressExtensions

NexusLabs.Foundry.MicrosoftAgentFramework.Workflows.Declarative

DeclarativeWorkflowProgressExtensions Class

Bridges an upstream declarative workflow event stream onto Foundry progress reporting.

public static class DeclarativeWorkflowProgressExtensions

Inheritance System.Object 🡒 DeclarativeWorkflowProgressExtensions

Methods

DeclarativeWorkflowProgressExtensions.ReportProgressTo(this IAsyncEnumerable<WorkflowEvent>, IProgressReporter, CancellationToken) Method

Reports each event to progressReporter as it passes through, yielding the original event unchanged so the caller still sees the complete upstream stream.

public static System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.AI.Workflows.WorkflowEvent> ReportProgressTo(this System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.AI.Workflows.WorkflowEvent> events, NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressReporter progressReporter, System.Threading.CancellationToken cancellationToken);

Parameters

events System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.AI.Workflows.WorkflowEvent>

progressReporter NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressReporter

cancellationToken System.Threading.CancellationToken

Returns

System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.AI.Workflows.WorkflowEvent>

Exceptions

System.ArgumentNullException
Any argument is null.

Remarks

This is a pass-through rather than a terminal consumer because the upstream stream is single-consumption: a caller that needs both progress reporting and its own handling would otherwise have to choose between them.

Events with no Foundry equivalent are forwarded without being reported rather than being mapped onto an approximate one, so a consumer never sees a progress event that claims more than the upstream stream actually said.