public override bool TryRemoveImage(string fileName)
        {
            if (PendingIds.Contains(fileName))
            {
                PendingIds.Remove(fileName);
            }

            string fullPath = Path.Combine(Watcher.Path, fileName);

            return(TryRemoveFile(fullPath));
        }
        private void OnDeleted(object source, FileSystemEventArgs e)
        {
            string fileName = e.Name;

            if (PendingIds.Contains(fileName))
            {
                PendingIds.Remove(fileName);
            }

            FileDeleted?.Invoke(fileName);
        }
        public override bool TryGetImage(string fileName, out byte[] outImageBytes)
        {
            if (PendingIds.Contains(fileName))
            {
                PendingIds.Remove(fileName);
            }

            string fullPath = Path.Combine(Watcher.Path, fileName);

            return(TryGetFile(fullPath, out outImageBytes));
        }
        private void OnRenamed(object source, RenamedEventArgs e)
        {
            string oldFileName = e.OldName;
            string newFileName = e.Name;

            if (PendingIds.Contains(oldFileName))
            {
                PendingIds.Remove(oldFileName);
            }

            // This will place the renamed file at the end of the list
            PendingIds.Add(newFileName);
            FileRenamed?.Invoke(oldFileName, newFileName);
        }