// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Agents.AI.Workflows;
///
/// Describes the protocol for communication with a or .
///
public class ProtocolDescriptor
{
///
/// Get the collection of types explicitly accepted by the or .
///
public IEnumerable Accepts { get; }
///
/// Gets the collection of types that could be yielded as output by the or .
///
public IEnumerable Yields { get; }
///
/// Gets the collection of types that could be sent from the . This is always empty for a .
///
public IEnumerable Sends { get; }
///
/// Gets a value indicating whether the or has a "catch-all" handler.
///
public bool AcceptsAll { get; set; }
internal ProtocolDescriptor(IEnumerable acceptedTypes, IEnumerable yieldedTypes, IEnumerable sentTypes, bool acceptsAll)
{
this.Accepts = acceptedTypes.ToArray();
this.Yields = yieldedTypes.ToArray();
this.Sends = sentTypes.ToArray();
this.AcceptsAll = acceptsAll;
}
}