Spelling & documentation

This commit is contained in:
Thorsten Sommer 2025-12-04 15:33:02 +01:00
parent 458096a743
commit 6faa488699
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5
3 changed files with 10 additions and 7 deletions

View File

@ -3,7 +3,7 @@ require("icon")
-- ------
-- This is an example of a configuration plugin. Please replace
-- the placeholders and assign a valid ID.
-- IDs should be lower-case.
-- All IDs should be lower-case.
-- ------
-- The ID for this plugin:
@ -98,7 +98,7 @@ CONFIG["SETTINGS"] = {}
-- Configure the preselected profile.
-- It must be one of the profile IDs defined in CONFIG["PROFILES"].
-- Using an empty string ("") will lock the preselected profile selection, even though no valid preselected profile is found.
-- Please note: using an empty string ("") will lock the preselected profile selection, even though no valid preselected profile is found.
-- CONFIG["SETTINGS"]["DataApp.PreselectedProfile"] = "00000000-0000-0000-0000-000000000000"
-- Example chat templates for this configuration:

View File

@ -167,19 +167,19 @@ public static partial class ManagedConfiguration
/// Furthermore, it locks the managed state of the configuration metadata to the provided configuration plugin ID.
/// The setting's value is set to the configured value.
/// </remarks>
/// <param name="type">Parameter type of the configuration entry.</param>
/// <param name="configuredType">Parameter type of the configuration entry.</param>
/// <param name="configPluginId">The ID of the related configuration plugin.</param>
/// <param name="settings">The Lua table containing the settings to process.</param>
/// <param name="configSelection">The expression to select the configuration class.</param>
/// <param name="propertyExpression">The expression to select the property within the configuration class.</param>
/// <param name="dryRun">When true, the method will not apply any changes, but only check if the configuration can be read.</param>
/// <typeparam name="TClass">The type of the configuration class.</typeparam>
/// <typeparam name="TDataType">The data type of the configuration.</typeparam>
/// <typeparam name="TDataType">The data type of the configured value.</typeparam>
/// <returns>True when the configuration was successfully processed, otherwise false.</returns>
public static bool TryProcessConfiguration<TClass, TDataType>(
Expression<Func<Data, TClass>> configSelection,
Expression<Func<TClass, string>> propertyExpression,
TDataType type,
TDataType configuredType,
Guid configPluginId,
LuaTable settings,
bool dryRun)
@ -201,12 +201,15 @@ public static partial class ManagedConfiguration
// Step 2 -- try to read the Lua value as a string:
if(configuredTextValue.TryRead<string>(out var configuredText))
{
switch (type)
switch (configuredType)
{
// Case: the read string is a Guid:
case Guid:
successful = Guid.TryParse(configuredText, out var id);
configuredValue = successful ? id.ToString().ToLowerInvariant(): configuredText;
break;
// Case: the read string is just a string:
case string:
configuredValue = configuredText;
successful = true;

View File

@ -1,2 +1,2 @@
# v0.9.55, build 230 (2025-12-xx xx:xx UTC)
- Improved the ID handling in the enterprise plugin.
- Improved the ID handling for configuration plugins.