public static bool ReadonlyDenied(FileIndexItem statusModel, FileIndexItem.ExifStatus statusResults, List <FileIndexItem> fileIndexResultsList) { switch (statusResults) { case FileIndexItem.ExifStatus.ReadOnly: statusModel.Status = FileIndexItem.ExifStatus.ReadOnly; fileIndexResultsList.Add(statusModel); return(true); } return(false); }
public static void ReadonlyAllowed(FileIndexItem statusModel, FileIndexItem.ExifStatus statusResults, List <FileIndexItem> fileIndexResultsList) { // Readonly is allowed if (statusResults != FileIndexItem.ExifStatus.ReadOnly) { return; } statusModel.Status = FileIndexItem.ExifStatus.ReadOnly; fileIndexResultsList.Add(statusModel); }
internal FileIndexItem AddDeleteStatus(FileIndexItem dbItem, FileIndexItem.ExifStatus exifStatus = FileIndexItem.ExifStatus.Deleted) { if (dbItem == null) { return(null); } if (dbItem.Tags.Contains("!delete!")) { dbItem.Status = exifStatus; } return(dbItem); }
/// <summary> /// Does deside if the loop should be stopped, true = stop /// Uses FileCollectionsCheck /// Add for all types exept for OK/Readonly! /// </summary> /// <param name="statusModel">the main object to return later</param> /// <param name="statusResults">the status by FileCollectionsCheck</param> /// <param name="fileIndexResultsList">list of object that will be returned</param> /// <returns>If true skip the next code</returns> public static bool ReturnExifStatusError(FileIndexItem statusModel, FileIndexItem.ExifStatus statusResults, List <FileIndexItem> fileIndexResultsList) { switch (statusResults) { case FileIndexItem.ExifStatus.DirReadOnly: statusModel.IsDirectory = true; statusModel.Status = FileIndexItem.ExifStatus.DirReadOnly; fileIndexResultsList.Add(statusModel); return(true); case FileIndexItem.ExifStatus.NotFoundNotInIndex: statusModel.Status = FileIndexItem.ExifStatus.NotFoundNotInIndex; fileIndexResultsList.Add(statusModel); return(true); case FileIndexItem.ExifStatus.NotFoundSourceMissing: statusModel.Status = FileIndexItem.ExifStatus.NotFoundSourceMissing; fileIndexResultsList.Add(statusModel); return(true); case FileIndexItem.ExifStatus.ReadOnly: statusModel.Status = FileIndexItem.ExifStatus.ReadOnly; fileIndexResultsList.Add(statusModel); return(true); case FileIndexItem.ExifStatus.OperationNotSupported: statusModel.Status = FileIndexItem.ExifStatus.OperationNotSupported; fileIndexResultsList.Add(statusModel); return(true); case FileIndexItem.ExifStatus.ExifWriteNotSupported: statusModel.Status = FileIndexItem.ExifStatus.ExifWriteNotSupported; fileIndexResultsList.Add(statusModel); return(true); } return(false); }