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,29 +2,32 @@ namespace AIStudio.Assistants.SWOTAnalysis;
internal static class SwotAnalysisCategoryExtensions
{
/// <summary>
/// The name of the category in the JSON the models read and write, e.g., "strengths".
/// </summary>
public static string JsonName(this SwotAnalysisCategory category) => category switch
extension(SwotAnalysisCategory category)
{
SwotAnalysisCategory.STRENGTHS => "strengths",
SwotAnalysisCategory.WEAKNESSES => "weaknesses",
SwotAnalysisCategory.OPPORTUNITIES => "opportunities",
SwotAnalysisCategory.THREATS => "threats",
/// <summary>
/// The name of the category in the JSON the models read and write, e.g., "strengths".
/// </summary>
public string JsonName() => category switch
{
SwotAnalysisCategory.STRENGTHS => "strengths",
SwotAnalysisCategory.WEAKNESSES => "weaknesses",
SwotAnalysisCategory.OPPORTUNITIES => "opportunities",
SwotAnalysisCategory.THREATS => "threats",
_ => string.Empty,
};
_ => string.Empty,
};
/// <summary>
/// The letter the factor IDs of the category start with, e.g., S1 for the first strength.
/// </summary>
public static string FactorIdPrefix(this SwotAnalysisCategory category) => category switch
{
SwotAnalysisCategory.STRENGTHS => "S",
SwotAnalysisCategory.WEAKNESSES => "W",
SwotAnalysisCategory.OPPORTUNITIES => "O",
SwotAnalysisCategory.THREATS => "T",
/// <summary>
/// The letter the factor IDs of the category start with, e.g., S1 for the first strength.
/// </summary>
public string FactorIdPrefix() => category switch
{
SwotAnalysisCategory.STRENGTHS => "S",
SwotAnalysisCategory.WEAKNESSES => "W",
SwotAnalysisCategory.OPPORTUNITIES => "O",
SwotAnalysisCategory.THREATS => "T",
_ => string.Empty,
};
_ => string.Empty,
};
}
}