public int GetAssetTimesAccessedFor(string assetId) { int timesAccessed = 0; AssetRecord rec = findRecordById(assetId); if (rec != null) { timesAccessed = rec.GetTimesUsed(); } return(timesAccessed); }
public void MarkAssetCompleted(string assetIdentifier) { AssetRecord record = findRecordById(assetIdentifier); long currentTime = GetCurrentMilli(); if (record.GetFirstAccessed() <= 0) { record.SetFirstAccessed(currentTime); } record.SetTimesUsed(record.GetTimesUsed() + 1); record.SetLastAccessed(currentTime); }