tbf/TBF/BenchControl/BackupAndSecurity/Default/Component.cs

39 lines
1.0 KiB
C#
Raw Normal View History

///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using Users;
using log4net;
namespace TBF.BenchControl.BackupAndSecurity.Default
{
/// <summary>
/// Holds backup and security options.
/// </summary>
public class Component : ComponentBase, GenericDevices.IBackupAndSecurity
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("BackupAndSecurity.Default({0})", Cfg.ToString(1)); }
readonly ComponentCfg myCfg;
public int MinPasswdLength { get { return myCfg.MinPasswdLength; } }
public int PasswdExpirationPeriodDays { get { return myCfg.PasswdExpirationPeriodDays; } }
public Component()
{
}
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
GlobalData.MinPasswdLength = myCfg.MinPasswdLength;
GlobalData.PasswdExpirationPeriodDays = myCfg.PasswdExpirationPeriodDays;
log.Debug(this.ToString());
}
}
}