Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows/ProtocolDescriptor.cs
T
Jacob Alber 0ef4e739d5 refactor: [BREAKING] Remove generic Workflow<T> (#1551)
Remove input type checking in favour of explicit `.DescribeProtocolAsync()` flow. Also removes `.AsAgentAsync()` as the validation happens at workflow run time. This makes it easier to use Workflows with DI without resorting to async-over-sync.
2025-10-21 00:13:41 +00:00

24 lines
641 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Agents.AI.Workflows;
/// <summary>
/// Describes the protocol for communication with a <see cref="Workflow"/> or <see cref="Executor"/>.
/// </summary>
public class ProtocolDescriptor
{
/// <summary>
/// Get the collection of types accepted by the <see cref="Workflow"/> or <see cref="Executor"/>.
/// </summary>
public IEnumerable<Type> Accepts { get; }
internal ProtocolDescriptor(IEnumerable<Type> acceptedTypes)
{
this.Accepts = acceptedTypes.ToArray();
}
}