// Copyright (c) Microsoft. All rights reserved. using System; using System.Collections.Immutable; using System.Linq; namespace Microsoft.Agents.Workflows.Declarative.IntegrationTests.Framework; internal sealed class WorkflowEvents { public WorkflowEvents(ImmutableList workflowEvents) { this.Events = workflowEvents; this.EventCounts = workflowEvents.GroupBy(e => e.GetType()).ToImmutableDictionary(e => e.Key, e => e.Count()); this.ActionInvokeEvents = workflowEvents.OfType().ToImmutableList(); this.ActionCompleteEvents = workflowEvents.OfType().ToImmutableList(); } public ImmutableList Events { get; } public IImmutableDictionary EventCounts { get; } public ImmutableList ActionInvokeEvents { get; } public ImmutableList ActionCompleteEvents { get; private set; } }