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

@@ -128,14 +128,14 @@ public partial class SettingsPanelApp : SettingsPanelBase
// Several configuration plugins may contribute at the same time, e.g. one preview feature
// for the whole organization and another one for a single department:
if (ManagedConfiguration.TryGet(x => x.App, x => x.EnabledPreviewFeatures, out var meta) && meta.HasPluginContribution)
return meta.PluginContributions.Values.SelectMany(contribution => contribution).Where(x => !x.IsReleased()).ToHashSet();
return meta.PluginContributions.Values.SelectMany(contribution => contribution).Where(x => !x.IsReleased).ToHashSet();
return [];
}
private bool IsPluginContributedPreviewFeature(PreviewFeatures feature)
{
if (feature.IsReleased())
if (feature.IsReleased)
return false;
if (!ManagedConfiguration.TryGet(x => x.App, x => x.EnabledPreviewFeatures, out var meta) || !meta.HasPluginContribution)
@@ -146,7 +146,7 @@ public partial class SettingsPanelApp : SettingsPanelBase
private HashSet<PreviewFeatures> GetSelectedPreviewFeatures()
{
var enabled = this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures.Where(x => !x.IsReleased()).ToHashSet();
var enabled = this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures.Where(x => !x.IsReleased).ToHashSet();
enabled.UnionWith(this.GetPluginContributedPreviewFeatures());
return enabled;
}
@@ -35,7 +35,7 @@
</HeaderContent>
<RowTemplate>
<MudTd Style="vertical-align: top;">
@context.ToName()
@context.Name
</MudTd>
<MudTd>
<MudMarkdown Value="@context.GetConfidence(this.SettingsManager).Description" MarkdownPipeline="Markdown.SAFE_MARKDOWN_PIPELINE"/>
@@ -54,7 +54,7 @@
continue;
<MudMenuItem OnClick="@(async () => await this.ChangeCustomConfidenceLevel(context, confidenceLevel))">
@confidenceLevel.GetName()
@confidenceLevel.Name
</MudMenuItem>
}
</MudMenu>
@@ -8,7 +8,7 @@ public partial class SettingsPanelConfidence : SettingsPanelBase
private string GetCurrentConfidenceLevelName(LLMProviders llmProvider)
{
if (this.TryGetShownConfidenceLevel(llmProvider, out var level))
return level.GetName();
return level.Name;
return T("Not yet configured");
}
@@ -32,7 +32,7 @@
<MudTh Class="provider-group-header" colspan="4">
@if (context.Key is LLMProviders llmProvider)
{
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.ToName()" />
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.Name" />
}
</MudTh>
</GroupHeaderTemplate>
@@ -74,7 +74,7 @@
else
{
<MudTooltip Text="@T("Open Dashboard")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())"/>
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.DashboardURL" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard)"/>
</MudTooltip>
<MudTooltip Text="@T("Edit")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Edit" OnClick="@(() => this.EditEmbeddingProvider(context))"/>
@@ -25,7 +25,7 @@
<MudTh Class="provider-group-header" colspan="4">
@if (context.Key is LLMProviders llmProvider)
{
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.ToName()" />
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.Name" />
}
</MudTh>
</GroupHeaderTemplate>
@@ -63,7 +63,7 @@
else
{
<MudTooltip Text="@T("Open Dashboard")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())"/>
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.DashboardURL" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard)"/>
</MudTooltip>
<MudTooltip Text="@T("Edit")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Edit" OnClick="@(() => this.EditLLMProvider(context))"/>
@@ -107,7 +107,7 @@ public partial class SettingsPanelTools : SettingsPanelBase
// minimum confidence; the long wording wraps into a tall block there:
private string GetConfidenceLevelName(ConfidenceLevel confidenceLevel) => confidenceLevel is ConfidenceLevel.NONE
? this.T("No minimum")
: confidenceLevel.GetName();
: confidenceLevel.Name;
private string SetCurrentConfidenceLevelColorStyle(ToolCatalogItem item) =>
$"background-color: {GetMinimumProviderConfidence(item).GetColor(this.SettingsManager)};";
@@ -29,7 +29,7 @@
<MudTh Class="provider-group-header" colspan="4">
@if (context.Key is LLMProviders llmProvider)
{
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.ToName()" />
<ProviderLabel ProviderType="@llmProvider" Text="@llmProvider.Name" />
}
</MudTh>
</GroupHeaderTemplate>
@@ -68,7 +68,7 @@
else
{
<MudTooltip Text="@T("Open Dashboard")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())"/>
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.DashboardURL" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard)"/>
</MudTooltip>
<MudTooltip Text="@T("Edit")">
<MudIconButton Color="Color.Info" Icon="@Icons.Material.Filled.Edit" OnClick="@(() => this.EditTranscriptionProvider(context))"/>