public RequestHandler(List <string> providedXMLs, ParseRequest requestedMetaData, OSMGeometryType requestedType, Action <string, double> reportProgress, string workerId) { this.XmlPaths = providedXMLs; this.RequestedMetaData = requestedMetaData; // Setup data holders this.FoundItemIds = new List <string>(); this.FoundData = new Dictionary <OSMTag, List <FoundItem> >(); foreach (OSMTag metaData in requestedMetaData.Requests) { this.FoundData[metaData] = new List <FoundItem>(); } // Setup reporting infrastructure this.WorkerId = workerId; this.ReportProgress = reportProgress; if (providedXMLs[0].Length < 1000) // Don't calculate line lengths when working with tests (e.g. passed by contents not path) { this.LinesPerFile = ProgressReporting.GetLineLengthsForFiles(providedXMLs, requestedType); } }