コード例 #1
0
    void LoadSuplex()
    {
        string splx = Utilities.PathCombine(_splxPath, "security.splx");

        if (File.Exists(splx))
        {
            _splxDal = new SuplexDal(splx);
        }
    }
コード例 #2
0
    void LoadSuplex()
    {
        string splxFile = DirectoryGetFile(_splxPath, "security.splx", throwFileNotFoundException: false);

        if (splxFile != null)
        {
            SuplexPoller.Enabled = true;

            zf.AwsS3ZephyrFile s3splx        = new zf.AwsS3ZephyrFile(_awsClient, splxFile);
            DateTime           lastWriteTime = GetFileDetails(s3splx).LastWriteTime;
            if (_splxLastWriteTime != lastWriteTime)
            {
                _splxLastWriteTime = lastWriteTime;

                if (_splxDal == null)
                {
                    _splxDal = new SuplexDal();
                }

                string storeData = s3splx.ReadAllText();
                _splxDal.LoadStoreData(storeData);
            }
        }
    }