Code ordering

This commit is contained in:
Thorsten Sommer 2026-02-01 14:07:28 +01:00
parent 5dd1e4b830
commit f668388192
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -476,23 +476,6 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
this.currentProfile = this.ResolveProfileSelection();
await this.AutoSave();
}
private string? ValidatePolicyName(string name)
{
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
return null;
if(string.IsNullOrWhiteSpace(name))
return T("Please provide a name for your policy. This name will be used to identify the policy in AI Studio.");
if(name.Length is > 60 or < 6)
return T("The name of your policy must be between 6 and 60 characters long.");
if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name))
return T("A policy with this name already exists. Please choose a different name.");
return null;
}
#region Overrides of MSGComponentBase
@ -559,6 +542,23 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore<NoSettingsPan
this.ClearInputIssues();
}
private string? ValidatePolicyName(string name)
{
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)
return null;
if(string.IsNullOrWhiteSpace(name))
return T("Please provide a name for your policy. This name will be used to identify the policy in AI Studio.");
if(name.Length is > 60 or < 6)
return T("The name of your policy must be between 6 and 60 characters long.");
if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name))
return T("A policy with this name already exists. Please choose a different name.");
return null;
}
private string? ValidatePolicyDescription(string description)
{
if(this.selectedPolicy?.IsEnterpriseConfiguration == true)