db620d33df
dotnet-build-and-test / dotnet-test-functions (push) Has been cancelled
dotnet-build-and-test / paths-filter (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Debug, windows-latest, net9.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, ubuntu-latest, net8.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-build (Release, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, ubuntu-latest, net10.0) (push) Has been cancelled
dotnet-build-and-test / dotnet-test (Release, integration, true, windows-latest, net472) (push) Has been cancelled
dotnet-build-and-test / dotnet-foundry-hosted-it (push) Has been cancelled
dotnet-build-and-test / dotnet-build-and-test-check (push) Has been cancelled
dotnet-build-and-test / Integration Test Report (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
34 lines
1.7 KiB
C#
34 lines
1.7 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.Framework;
|
|
|
|
internal sealed class WorkflowEvents
|
|
{
|
|
public WorkflowEvents(IReadOnlyList<WorkflowEvent> workflowEvents)
|
|
{
|
|
this.Events = workflowEvents;
|
|
this.EventCounts = workflowEvents.GroupBy(e => e.GetType()).ToDictionary(e => e.Key, e => e.Count());
|
|
this.ActionInvokeEvents = workflowEvents.OfType<DeclarativeActionInvokedEvent>().ToList();
|
|
this.ActionCompleteEvents = workflowEvents.OfType<DeclarativeActionCompletedEvent>().ToList();
|
|
this.ConversationEvents = workflowEvents.OfType<ConversationUpdateEvent>().ToList();
|
|
this.ExecutorInvokeEvents = workflowEvents.OfType<ExecutorInvokedEvent>().ToList();
|
|
this.ExecutorCompleteEvents = workflowEvents.OfType<ExecutorCompletedEvent>().ToList();
|
|
this.InputEvents = workflowEvents.OfType<RequestInfoEvent>().ToList();
|
|
this.AgentResponseEvents = workflowEvents.OfType<AgentResponseEvent>().ToList();
|
|
}
|
|
|
|
public IReadOnlyList<WorkflowEvent> Events { get; }
|
|
public IReadOnlyDictionary<Type, int> EventCounts { get; }
|
|
public IReadOnlyList<ConversationUpdateEvent> ConversationEvents { get; }
|
|
public IReadOnlyList<DeclarativeActionInvokedEvent> ActionInvokeEvents { get; }
|
|
public IReadOnlyList<DeclarativeActionCompletedEvent> ActionCompleteEvents { get; }
|
|
public IReadOnlyList<ExecutorInvokedEvent> ExecutorInvokeEvents { get; }
|
|
public IReadOnlyList<ExecutorCompletedEvent> ExecutorCompleteEvents { get; }
|
|
public IReadOnlyList<RequestInfoEvent> InputEvents { get; }
|
|
public IReadOnlyList<AgentResponseEvent> AgentResponseEvents { get; }
|
|
}
|