public void ProcessFile(string filename)
        {
            var processor = new FileProcessor
            {
                Context             = Context,
                Client              = Client,
                LocationCache       = LocationCache,
                ReferencePointCache = ReferencePointCache,
                ParameterIdLookup   = ParameterIdLookup,
                MethodLookup        = MethodLookup,
                LoadedPlugins       = LoadedPlugins,
                ProcessingFolder    = ProcessingFolder,
                PartialFolder       = PartialFolder,
                ArchivedFolder      = ArchivedFolder,
                UploadedFolder      = UploadedFolder,
                FailedFolder        = FailedFolder,
                CancellationToken   = CancellationToken
            };

            if (ImportZipEntries.TryGetValue(filename, out var zipEntry) && ZipEntryParser.IsFieldVisit(filename, out var locationIdentifier))
            {
                processor.ProcessZipEntry(zipEntry, locationIdentifier);
                return;
            }

            var sourcePath = Path.Combine(SourceFolder, filename);

            if (!File.Exists(sourcePath))
            {
                throw new ExpectedException($"'{sourcePath}' no longer exists");
            }

            processor.ProcessFile(sourcePath);
        }
        private List <string> GetFilesFromImportProject()
        {
            if (Archive != null)
            {
                return(new List <string>());
            }

            if (!File.Exists(Context.ImportZip))
            {
                throw new ExpectedException($"File '{Context.ImportZip}' does not exist.");
            }

            Archive = Archive.OpenForRead(Context.ImportZip, options =>
            {
                options.ValidateOnlyFieldVisitFiles = true;
            });

            ZipEntryParser   = new ZipEntryParser(Archive.Project);
            ImportZipEntries = Archive
                               .FieldVisitEntries
                               .ToDictionary(e => e.FullName, e => e);

            return(ImportZipEntries
                   .Keys
                   .OrderBy(name => name)
                   .ToList());
        }