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

@@ -9,7 +9,7 @@ public static class PreviewFeaturesExtensions
/// <param name="feature">The preview feature to check.</param>
extension(PreviewFeatures feature)
{
public string GetPreviewDescription() => feature switch
public string PreviewDescription => feature switch
{
PreviewFeatures.PRE_WRITER_MODE_2024 => TB("Writer Mode: Experiments about how to write long texts using AI"),
PreviewFeatures.PRE_RAG_2024 => TB("RAG: Preview of our RAG implementation where you can refer your files or integrate enterprise data within your company"),
@@ -32,8 +32,8 @@ public static class PreviewFeaturesExtensions
/// This metadata is necessary because we cannot remove the enum values from the list.
/// Otherwise, we could not deserialize old settings files that may contain these values.
/// </remarks>
/// <returns>True when the preview feature is released, false otherwise.</returns>
public bool IsReleased() => feature switch
/// <value>True when the preview feature is released, false otherwise.</value>
public bool IsReleased => feature switch
{
PreviewFeatures.PRE_READ_PDF_2025 => true,
PreviewFeatures.PRE_PLUGINS_2025 => true,
@@ -45,7 +45,7 @@ public static class PreviewFeaturesExtensions
public bool IsEnabled(SettingsManager settingsManager)
{
if(feature.IsReleased())
if(feature.IsReleased)
return true;
return settingsManager.ConfigurationData.App.EnabledPreviewFeatures.Contains(feature);