// Copyright (c) Microsoft. All rights reserved. using Microsoft.Agents.AI.Workflows.Execution; using PredicateT = System.Func; namespace Microsoft.Agents.AI.Workflows; /// /// Represents a directed edge between two nodes, optionally associated with a condition that determines whether the /// edge is active. /// public sealed class DirectEdgeData : EdgeData { internal DirectEdgeData(string sourceId, string sinkId, EdgeId id, PredicateT? condition = null, string? label = null) : base(id, label) { this.SourceId = sourceId; this.SinkId = sinkId; this.Condition = condition; this.Connection = new([sourceId], [sinkId]); } /// /// The Id of the source node. /// public string SourceId { get; } /// /// The Id of the destination node. /// public string SinkId { get; } /// /// An optional predicate determining whether the edge is active for a given message. If , /// the edge is always active when a message is generated by the source. /// public PredicateT? Condition { get; } /// internal override EdgeConnection Connection { get; } }