Apply code style formatting and restore partial modifiers on Avalonia views

Linter/formatter pass across the full codebase. Restores required partial
keyword on AXAML code-behind classes that the formatter incorrectly removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-03-31 07:58:13 -04:00
parent 55ef854612
commit 41a6b66943
221 changed files with 4274 additions and 3823 deletions

View File

@@ -5,22 +5,19 @@ using ZB.MOM.WW.LmxOpcUa.Host.Domain;
namespace ZB.MOM.WW.LmxOpcUa.Tests.Helpers
{
/// <summary>
/// Deterministic authentication provider for integration tests.
/// Validates credentials against hardcoded username/password pairs
/// and returns configured role sets per user.
/// Deterministic authentication provider for integration tests.
/// Validates credentials against hardcoded username/password pairs
/// and returns configured role sets per user.
/// </summary>
internal class FakeAuthenticationProvider : IUserAuthenticationProvider, IRoleProvider
{
private readonly Dictionary<string, string> _credentials =
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
private readonly Dictionary<string, IReadOnlyList<string>> _roles =
new Dictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase);
private readonly Dictionary<string, string> _credentials = new(StringComparer.OrdinalIgnoreCase);
public FakeAuthenticationProvider AddUser(string username, string password, params string[] roles)
private readonly Dictionary<string, IReadOnlyList<string>> _roles = new(StringComparer.OrdinalIgnoreCase);
public IReadOnlyList<string> GetUserRoles(string username)
{
_credentials[username] = password;
_roles[username] = roles;
return this;
return _roles.TryGetValue(username, out var roles) ? roles : new[] { AppRoles.ReadOnly };
}
public bool ValidateCredentials(string username, string password)
@@ -28,9 +25,11 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Helpers
return _credentials.TryGetValue(username, out var expected) && expected == password;
}
public IReadOnlyList<string> GetUserRoles(string username)
public FakeAuthenticationProvider AddUser(string username, string password, params string[] roles)
{
return _roles.TryGetValue(username, out var roles) ? roles : new[] { AppRoles.ReadOnly };
_credentials[username] = password;
_roles[username] = roles;
return this;
}
}
}
}