コード例 #1
0
        public int GetAssetTimesAccessedFor(string assetId)
        {
            int         timesAccessed = 0;
            AssetRecord rec           = findRecordById(assetId);

            if (rec != null)
            {
                timesAccessed = rec.GetTimesUsed();
            }
            return(timesAccessed);
        }
コード例 #2
0
        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);
        }