// 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 workflowEvents) { this.Events = workflowEvents; this.EventCounts = workflowEvents.GroupBy(e => e.GetType()).ToDictionary(e => e.Key, e => e.Count()); this.ActionInvokeEvents = workflowEvents.OfType().ToList(); this.ActionCompleteEvents = workflowEvents.OfType().ToList(); this.ConversationEvents = workflowEvents.OfType().ToList(); this.ExecutorInvokeEvents = workflowEvents.OfType().ToList(); this.ExecutorCompleteEvents = workflowEvents.OfType().ToList(); this.InputEvents = workflowEvents.OfType().ToList(); this.AgentResponseEvents = workflowEvents.OfType().ToList(); } public IReadOnlyList Events { get; } public IReadOnlyDictionary EventCounts { get; } public IReadOnlyList ConversationEvents { get; } public IReadOnlyList ActionInvokeEvents { get; } public IReadOnlyList ActionCompleteEvents { get; } public IReadOnlyList ExecutorInvokeEvents { get; } public IReadOnlyList ExecutorCompleteEvents { get; } public IReadOnlyList InputEvents { get; } public IReadOnlyList AgentResponseEvents { get; } }