using ConfigOperator;
using System.IO;

namespace AlarmInfoServerSim.Services
{
    public class SharedConfig : ISharedConfig
    {
        private BasicInfo? _basicInfo;
        public SharedConfig() 
        {
            string basicInfoPath = Path.Combine(new DirectoryInfo(Paths.LocalPath!)!.Parent!.Parent!.FullName, "Settings", "Base", "BasicInfo.xml");
            BaseConfigFileLoader.Load(basicInfoPath, out _basicInfo);
        }

        public BasicInfo? BasicInfo => _basicInfo;
    }
}
