Moved all extension methods into extension blocks (#1155)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 10:46:18 +01:00
1 parent acc7d09fa2
commit c0a75f39ac
138 files changed
+5884 -4954

No files matched your search

@@ -2,21 +2,24 @@ namespace AIStudio.Tools.ToolCallingSystem.ToolCallingImplementations.WebSearch;
public static class WebSearchBackendExtensions
{
/// <summary>
/// The name of one search service, as the user reads it and as a search result reports it.
/// </summary>
/// <remarks>
/// Product names, so they are not translated: SearXNG is called SearXNG in every language.
/// What gets stored is the enum member name instead, which is what leaves this free to be
/// worded for people — in the settings dropdown, in a note explaining which service
/// answered, and in the result the model reads.
/// </remarks>
public static string ToName(this WebSearchBackend backend) => backend switch
extension(WebSearchBackend backend)
{
WebSearchBackend.SEARXNG => "SearXNG",
WebSearchBackend.STAAN => "Staan",
WebSearchBackend.TAVILY => "Tavily",
/// <summary>
/// The name of one search service, as the user reads it and as a search result reports it.
/// </summary>
/// <remarks>
/// Product names, so they are not translated: SearXNG is called SearXNG in every language.
/// What gets stored is the enum member name instead, which is what leaves this free to be
/// worded for people — in the settings dropdown, in a note explaining which service
/// answered, and in the result the model reads.
/// </remarks>
public string ToName() => backend switch
{
WebSearchBackend.SEARXNG => "SearXNG",
WebSearchBackend.STAAN => "Staan",
WebSearchBackend.TAVILY => "Tavily",
_ => backend.ToString(),
};
_ => backend.ToString(),
};
}
}