Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows/AIAgentIDEqualityComparer.cs
T
Jacob AlberandGitHub 331c750515 .NET: [BREAKING] Enable sharing of workflow instances across concurrently executing runs (#1464)
* refactor: remove unused internals

* feat: Execution Mode for sharing a workflow among concurrent runs

* feat: Update WorkflowHostAgent to support concurrent execution

* Also update AsAgent APIs to support injecting a CheckpointManager and an IWorkflowExecutionEnvironment

* fix: Make Read logic consistent in DeclarativeWorkflowContext
2025-10-15 21:34:17 +00:00

14 lines
470 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Agents.AI.Workflows;
internal sealed class AIAgentIDEqualityComparer : IEqualityComparer<AIAgent>
{
public static AIAgentIDEqualityComparer Instance { get; } = new();
public bool Equals(AIAgent? x, AIAgent? y) => x?.Id == y?.Id;
public int GetHashCode([DisallowNull] AIAgent obj) => obj?.GetHashCode() ?? 0;
}