Fixed naming of variable

This commit is contained in:
Thorsten Sommer 2024-05-19 16:12:50 +02:00
parent 5982559ceb
commit 6da453e022
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -56,7 +56,7 @@ public partial class ProviderDialog : ComponentBase
/// <summary> /// <summary>
/// The list of used instance names. We need this to check for uniqueness. /// The list of used instance names. We need this to check for uniqueness.
/// </summary> /// </summary>
private List<string> usedInstanceNames { get; set; } = []; private List<string> UsedInstanceNames { get; set; } = [];
private bool dataIsValid; private bool dataIsValid;
private string[] dataIssues = []; private string[] dataIssues = [];
@ -74,7 +74,7 @@ public partial class ProviderDialog : ComponentBase
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
// Load the used instance names: // Load the used instance names:
this.usedInstanceNames = this.SettingsManager.ConfigurationData.Providers.Select(x => x.InstanceName.ToLowerInvariant()).ToList(); this.UsedInstanceNames = this.SettingsManager.ConfigurationData.Providers.Select(x => x.InstanceName.ToLowerInvariant()).ToList();
// When editing, we need to load the data: // When editing, we need to load the data:
if(this.IsEditing) if(this.IsEditing)
@ -189,7 +189,7 @@ public partial class ProviderDialog : ComponentBase
// The instance name must be unique: // The instance name must be unique:
var lowerInstanceName = instanceName.ToLowerInvariant(); var lowerInstanceName = instanceName.ToLowerInvariant();
if (lowerInstanceName != this.dataEditingPreviousInstanceName && this.usedInstanceNames.Contains(lowerInstanceName)) if (lowerInstanceName != this.dataEditingPreviousInstanceName && this.UsedInstanceNames.Contains(lowerInstanceName))
return "The instance name must be unique; the chosen name is already in use."; return "The instance name must be unique; the chosen name is already in use.";
return null; return null;