private IEnumerable<ItemType> ProcessOperation(xmlfilecontent_object objectToCollect) { IEnumerable<string> processedFilenames = null; IEnumerable<string> processedPaths = null; if (objectToCollect.IsFilePathDefined()) { var filepath = this.GetDictionaryWithElement(xmlfilecontent_ItemsChoices.filepath, objectToCollect.GetAllObjectEntities()); var filePathOperationResult = this.PathOperatorEvaluator.ProcessOperationFilePath(filepath); processedPaths = filePathOperationResult.Paths; processedFilenames = new List<String>(); foreach (var completeFilepath in filePathOperationResult.FileNames) ((List<String>)processedFilenames).Add(System.IO.Path.GetFileName(completeFilepath)); } else { var paths = this.GetDictionaryWithElement(xmlfilecontent_ItemsChoices.path, objectToCollect.GetAllObjectEntities()); processedPaths =this.PathOperatorEvaluator.ProcessOperationsPaths(paths); var fileNames = this.GetDictionaryWithElement(xmlfilecontent_ItemsChoices.filename, objectToCollect.GetAllObjectEntities()); processedFilenames = this.PathOperatorEvaluator.ProcessOperationFileName(fileNames, processedPaths, false); } var xPathEntity = ((EntitySimpleBaseType)objectToCollect.GetItemValue(xmlfilecontent_ItemsChoices.xpath)); var xpaths = new string[] { xPathEntity.Value }; if ((processedPaths == null) || (processedPaths.Count() == 0) || (processedFilenames == null) || (processedFilenames.Count() == 0)) { var completeFilepath = objectToCollect.GetCompleteFilepath(); if (PathOperatorEvaluator.Platform.Equals(FamilyEnumeration.unix)) completeFilepath = completeFilepath.ToUnixPath(); var newXmlFileContentItem = CreateXmlFileItem(completeFilepath, xpaths.First()); newXmlFileContentItem.status = StatusEnumeration.doesnotexist; newXmlFileContentItem.filepath.status = newXmlFileContentItem.status; return new ItemType[] { newXmlFileContentItem }; } var mustCheckIfFileExists = true; // this.MustCheckIfFileExists(objectToCollect); return this.CreateFileItemTypesByCombinationOfEntitiesFrom(processedPaths, processedFilenames, xpaths, mustCheckIfFileExists); }