private bool MustCheckIfFileExists(xmlfilecontent_object xmlFileContentObject)
        {
            var allObjectEntities = xmlFileContentObject.GetAllObjectEntities();
            EntitySimpleBaseType filepathEntity = null;
            allObjectEntities.TryGetValue(xmlfilecontent_ItemsChoices.filepath.ToString(), out filepathEntity);
            if (filepathEntity != null)
                return filepathEntity.var_check.Equals(CheckEnumeration.all);

            EntitySimpleBaseType pathEntity = null;
            EntitySimpleBaseType filenameEntity = null;
            allObjectEntities.TryGetValue(xmlfilecontent_ItemsChoices.path.ToString(), out pathEntity);
            allObjectEntities.TryGetValue(xmlfilecontent_ItemsChoices.filename.ToString(), out filenameEntity);
            return (((pathEntity != null) && string.IsNullOrWhiteSpace(pathEntity.var_ref) && pathEntity.var_check.Equals(CheckEnumeration.all)) ||
                    ((filenameEntity != null) && string.IsNullOrWhiteSpace(filenameEntity.var_ref) && filenameEntity.var_check.Equals(CheckEnumeration.all)));
        }
 private IEnumerable<String> EvaluateEntity(
     xmlfilecontent_object xmlfilecontentObject, xmlfilecontent_ItemsChoices entityName)
 {
     var entity = xmlfilecontentObject.GetAllObjectEntities()[entityName.ToString()];
     return this.VariableEntityEvaluator.EvaluateVariableForEntity(entity);
 }
        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);
        }