From 7a35626c918166b2ef2bade7450eb43caa2a07de Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 31 Jul 2025 15:51:41 +0200 Subject: [PATCH] Added documentation --- .../Settings/SettingsLocker.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/MindWork AI Studio/Settings/SettingsLocker.cs b/app/MindWork AI Studio/Settings/SettingsLocker.cs index e7da5c07..cc4a918f 100644 --- a/app/MindWork AI Studio/Settings/SettingsLocker.cs +++ b/app/MindWork AI Studio/Settings/SettingsLocker.cs @@ -6,6 +6,12 @@ public sealed class SettingsLocker { private readonly Dictionary> lockedProperties = new(); + /// + /// Registers a property of a class to be locked by a specific configuration plugin ID. + /// + /// The property expression to lock. + /// The ID of the configuration plugin that locks the property. + /// The type of the class that contains the property. public void Register(Expression> propertyExpression, Guid configurationPluginId) { var memberExpression = propertyExpression.GetMemberExpression(); @@ -18,6 +24,11 @@ public sealed class SettingsLocker this.lockedProperties[className].TryAdd(propertyName, configurationPluginId); } + /// + /// Removes the lock for a property of a class. + /// + /// The property expression to remove the lock for. + /// The type of the class that contains the property. public void Remove(Expression> propertyExpression) { var memberExpression = propertyExpression.GetMemberExpression(); @@ -35,6 +46,12 @@ public sealed class SettingsLocker } } + /// + /// Gets the configuration plugin ID that locks a specific property of a class. + /// + /// + /// + /// public Guid GetConfigurationPluginId(Expression> propertyExpression) { var memberExpression = propertyExpression.GetMemberExpression();