private void ReadInfo() { var infoPath = Path.Combine(this.BasePath, "info.json"); if (FileUtility.Exists(infoPath) == true) { try { this.info = JsonSerializerUtility.Read <DataServiceItemInfo>(infoPath); } catch (Exception e) { this.logService.Error(e); } } }
protected DataServiceItemBase(IDataBase dataBase) { this.dataBase = dataBase; this.dataBaseName = dataBase.Name; this.dataBase.Loaded += DataBase_Loaded; this.dataBase.Renamed += DataBase_Renamed; this.dataBase.Unloaded += DataBase_Unloaded; this.logService = dataBase.GetService(typeof(ILogService)) as ILogService; if (dataBase is DataBase dataBaseInternal) { this.noCache = dataBaseInternal.CremaHost.NoCache; } if (this.noCache == false) { this.ReadInfo(); } if (this.info.Revision != dataBase.DataBaseInfo.Revision) { this.info = new DataServiceItemInfo(); } }