/// <summary> /// Load all records stored in database path /// </summary> protected virtual void LoadReports() { if (!Enable) { return; } var files = BacktraceDatabaseFileContext.GetRecords(); foreach (var file in files) { var record = BacktraceDatabaseRecord.ReadFromFile(file); if (record == null) { continue; } record.DatabasePath(DatabaseSettings.DatabasePath); if (!record.Valid()) { try { Debug.Log("Removing record from Backtrace Database path - invalid record."); record.Delete(); } catch (Exception) { Debug.LogWarning(string.Format("Cannot remove file from database. File name: {0}", file.FullName)); } continue; } BacktraceDatabaseContext.Add(record); ValidateDatabaseSize(); record.Unlock(); } }
/// <summary> /// Load all records stored in database path /// </summary> protected virtual void LoadReports() { if (!Enable) { return; } var files = BacktraceDatabaseFileContext.GetRecords(); foreach (var file in files) { var record = BacktraceDatabaseRecord.ReadFromFile(file); if (record == null) { continue; } if (!BacktraceDatabaseFileContext.IsValidRecord(record)) { BacktraceDatabaseFileContext.Delete(record); continue; } BacktraceDatabaseContext.Add(record); ValidateDatabaseSize(); record.Unlock(); } }
/// <summary> /// Load all records stored in database path /// </summary> private void LoadReports() { var files = BacktraceDatabaseFileContext.GetRecords(); foreach (var file in files) { var record = BacktraceDatabaseRecord.ReadFromFile(file); if (!record.Valid()) { record.Delete(); continue; } BacktraceDatabaseContext.Add(record); ValidateDatabaseSize(); record.Dispose(); } }
/// <summary> /// Load all records stored in database path /// </summary> private void LoadReports() { var files = BacktraceDatabaseFileContext.GetRecords(); foreach (var file in files) { var record = BacktraceDatabaseRecord.ReadFromFile(file); if (!record.Valid()) { try { record.Delete(); } catch (Exception) { Debug.LogWarning($"Cannot remove file from database. File name: {file.FullName}"); } continue; } BacktraceDatabaseContext.Add(record); ValidateDatabaseSize(); record.Dispose(); } }