Example #1
0
        protected DriveFile GetDriveEntry(object entryId)
        {
            DriveFile entry   = null;
            Exception e       = null;
            var       driveId = MakeDriveId(entryId);

            try
            {
                entry = CacheEntry.Get(GoogleDriveProviderInfo.ID + driveId, () => GoogleDriveProviderInfo.Storage.GetEntry(driveId));
            }
            catch (Exception ex)
            {
                e = ex;
            }
            if (entry == null)
            {
                //Create error entry
                entry = new ErrorDriveEntry(e, driveId);
            }

            return(entry);
        }