// Copyright (c) Microsoft. All rights reserved. using Microsoft.Agents.AI.Hosting.OpenAI.Models; namespace Microsoft.Agents.AI.Hosting.OpenAI.Conversations; /// /// Extension methods for . /// internal static class SortOrderExtensions { /// /// Converts a to its string representation. /// /// The sort order. /// The string representation ("asc" or "desc"). public static string ToOrderString(this SortOrder order) { return order == SortOrder.Ascending ? "asc" : "desc"; } /// /// Checks if the sort order is ascending. /// /// The sort order. /// True if ascending, false otherwise. public static bool IsAscending(this SortOrder order) { return order == SortOrder.Ascending; } }