/// /// Copyright (c) 2019 Sensus Slovensko a.s. /// using System; using log4net; namespace TBF.BenchControl.DataContainers.BackupAndSecurityOptions { /// /// Holds backup and security options. /// public class Component : ComponentBase { private static readonly ILog log = LogManager.GetLogger(typeof(Component)); public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), 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; Users.GlobalData.MinPasswdLength = myCfg.MinPasswdLength; Users.GlobalData.PasswdExpirationPeriodDays = myCfg.PasswdExpirationPeriodDays; log.Warn(this.ToString()); } } }