227a749cdf
Fix 173 of 175 documentation issues across 48 files using CommentChecker, adding missing <summary>, <param>, and <inheritdoc /> tags to public APIs.
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using JdeScoping.ConfigManager.Models;
|
|
|
|
namespace JdeScoping.ConfigManager.ViewModels.Forms;
|
|
|
|
/// <summary>
|
|
/// ViewModel for editing Auth configuration section.
|
|
/// </summary>
|
|
public class AuthFormViewModel : ViewModelBase
|
|
{
|
|
private readonly AuthSection _model;
|
|
private readonly Action _onChanged;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AuthFormViewModel"/> class.
|
|
/// </summary>
|
|
/// <param name="model">The auth section model to edit.</param>
|
|
/// <param name="onChanged">The callback to invoke when configuration changes.</param>
|
|
public AuthFormViewModel(AuthSection model, Action onChanged)
|
|
{
|
|
_model = model ?? throw new ArgumentNullException(nameof(model));
|
|
_onChanged = onChanged ?? throw new ArgumentNullException(nameof(onChanged));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the name of the authentication cookie.
|
|
/// </summary>
|
|
public string CookieName
|
|
{
|
|
get => _model.CookieName;
|
|
set
|
|
{
|
|
if (_model.CookieName != value)
|
|
{
|
|
_model.CookieName = value;
|
|
OnPropertyChanged();
|
|
_onChanged();
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the cookie expiration time in minutes.
|
|
/// </summary>
|
|
public int CookieExpirationMinutes
|
|
{
|
|
get => _model.CookieExpirationMinutes;
|
|
set
|
|
{
|
|
if (_model.CookieExpirationMinutes != value)
|
|
{
|
|
_model.CookieExpirationMinutes = value;
|
|
OnPropertyChanged();
|
|
_onChanged();
|
|
}
|
|
}
|
|
}
|
|
}
|