Turned getter-like extension methods into extension properties (#1157)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 13:00:56 +01:00
1 parent 0375318b1b
commit f649febf88
286 files changed
+1379 -1109

No files matched your search

@@ -8,7 +8,7 @@ public static class AssistantCategoryExtensions
extension(AssistantCategory category)
{
public string Name() => category switch
public string Name => category switch
{
AssistantCategory.AS_IS => TB("Select the assistant category"),
AssistantCategory.GENERAL => TB("General"),
@@ -23,12 +23,15 @@ public static class AssistantCategoryExtensions
_ => string.Empty,
};
public string NameSelecting()
public string NameSelecting
{
if(category is AssistantCategory.AS_IS)
return TB("Please select the assistant category");
get
{
if(category is AssistantCategory.AS_IS)
return TB("Please select the assistant category");
return category.Name();
return category.Name;
}
}
}
}