diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs index dec2b31bb8..8201f8d8fe 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/InProc/InProcessRunnerContext.cs @@ -271,7 +271,7 @@ internal sealed class InProcessRunnerContext : IRunnerContext if (!this._outputFilter.TryGetTags(sourceId, out HashSet? tags)) { - // Not designated as an output source — drop silently (matches Python semantics). + // Not designated as an output source — drop silently. return; } diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowOutputEvent.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowOutputEvent.cs index 73b60f9643..fab2d4d30a 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowOutputEvent.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowOutputEvent.cs @@ -14,6 +14,8 @@ namespace Microsoft.Agents.AI.Workflows; [JsonDerivedType(typeof(AgentResponseUpdateEvent))] public class WorkflowOutputEvent : WorkflowEvent { + private HashSet _tags; + /// /// Initializes a new instance of the class with no tags. /// @@ -44,7 +46,7 @@ public class WorkflowOutputEvent : WorkflowEvent public WorkflowOutputEvent(object data, string executorId, IEnumerable? tags) : base(data) { this.ExecutorId = executorId; - this.Tags = tags is null ? new HashSet() : new HashSet(tags); + this._tags = tags is null ? new HashSet() : new HashSet(tags); } /// @@ -64,12 +66,12 @@ public class WorkflowOutputEvent : WorkflowEvent /// empty for terminal/regular outputs. The presence of /// marks this event as an intermediate output. /// - public HashSet Tags { get; } + public IEnumerable Tags => this._tags; /// /// Returns if this event carries the given tag. /// - public bool HasTag(OutputTag tag) => this.Tags.Contains(tag); + public bool HasTag(OutputTag tag) => this._tags.Contains(tag); /// /// Determines whether the underlying data is of the specified type or a derived type.