// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.Teams.AI;
///
/// a collection of functions
///
[Obsolete("Microsoft.Teams.AI is deprecated and will be removed by end of summer 2026.")]
public class FunctionCollection : Dictionary
{
///
/// the names of the functions in
/// the collection
///
public IList Names => Keys.ToList();
///
/// the functions in the collection
/// as a list
///
public IList List => Values.ToList();
///
/// check if the collection contains
/// some function name
///
/// the function name
public bool Has(string name) => ContainsKey(name);
///
/// get a function
///
/// the function name
public IFunction? Get(string name) => !Has(name) ? null : this[name];
///
/// add a function
///
/// the function to add
public void Add(IFunction function) => this[function.Name] = function;
}