コード例 #1
0
    // ファイルから復元
    public ThinMemoryDb(string filePath)
    {
        ThinMemoryDb?tmp = Lfs.ReadJsonFromFile <ThinMemoryDb>(filePath, maxSize: Consts.Numbers.LocalDatabaseJsonFileMaxSize, nullIfError: true);

        if (tmp == null)
        {
            tmp = Lfs.ReadJsonFromFile <ThinMemoryDb>(filePath + ".bak", maxSize: Consts.Numbers.LocalDatabaseJsonFileMaxSize, nullIfError: false);
        }

        this.SvcList     = tmp.SvcList;
        this.MachineList = tmp.MachineList;
        this.VarList     = tmp.VarList;

        BuildOnMemoryData();
    }