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

@@ -520,14 +520,14 @@ public partial class AssistantBuilder : AssistantBaseCore<SettingsDialogAssistan
{
AssistantCategory.AS_IS => string.Empty,
AssistantCategory.OTHER => this.customCategory,
_ => this.selectedCategory.Name(),
_ => this.selectedCategory.Name,
};
private string GetSelectedOutputLanguageName() => this.selectedOutputLanguage switch
{
CommonLanguages.AS_IS => string.Empty,
CommonLanguages.OTHER => this.customOutputLanguage,
_ => this.selectedOutputLanguage.Name(),
_ => this.selectedOutputLanguage.Name,
};
private string GetSelectedAssistantComponentText(IReadOnlyList<string?>? selectedValues)
@@ -625,7 +625,7 @@ public partial class AssistantBuilder : AssistantBaseCore<SettingsDialogAssistan
private string GetAssistantComponentDisplayName(string? typeName)
{
if (Enum.TryParse<AssistantComponentType>(typeName, out var type))
return type.GetDisplayName();
return type.DisplayName;
return typeName ?? string.Empty;
}
@@ -726,7 +726,7 @@ public partial class AssistantBuilder : AssistantBaseCore<SettingsDialogAssistan
this.UpsertAudit(this.pluginAudit);
await this.SettingsManager.StoreSettings();
await this.MessageBus.SendSuccess(new(
this.pluginAudit.Level.GetIcon(),
this.pluginAudit.Level.Icon,
this.pluginAudit.Findings.Count == 0
? T("Security check completed. No security issues were found.")
: T("Security check completed with findings.")));
@@ -787,8 +787,8 @@ public partial class AssistantBuilder : AssistantBaseCore<SettingsDialogAssistan
string.Format(
T("The assistant '{0}' was checked with the level '{1}', which is below your required level '{2}'. Your settings allow activation anyway, but this may be unsafe. Do you want to enable this assistant?"),
this.pluginInstallResult?.PluginName ?? T("Unknown assistant"),
this.pluginAudit?.Level.GetName() ?? T("Unknown"),
this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel.GetName())
this.pluginAudit?.Level.Name ?? T("Unknown"),
this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel.Name)
},
};