private IEnumerable<ItemType> ProcessOperation(fileauditedpermissions53_object objectToCollect) { this.checkPathOperatorInstance(); IEnumerable<string> processedFilenames = null; IEnumerable<string> processedPaths = null; if (objectToCollect.IsFilePathDefined()) { var filepath = this.GetDictionaryWithElement(fileauditedpermissions53_objectItemsChoices.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(fileauditedpermissions53_objectItemsChoices.path, objectToCollect.GetAllObjectEntities()); processedPaths = this.PathOperatorEvaluator.ProcessOperationsPaths(paths); var fileNames = this.GetDictionaryWithElement(fileauditedpermissions53_objectItemsChoices.filename, objectToCollect.GetAllObjectEntities()); processedFilenames = this.PathOperatorEvaluator.ProcessOperationFileName(fileNames, processedPaths, false); } var trusteeSID = ((EntitySimpleBaseType)objectToCollect.GetItemValue(fileauditedpermissions53_objectItemsChoices.trustee_sid)); var xpaths = new string[] { trusteeSID.Value }; return this.CreateFileItemTypesByCombinationOfEntitiesFrom(processedPaths, processedFilenames, xpaths); }
private IEnumerable<String> EvaluateEntity( fileauditedpermissions53_object fileAuditedPermissions53Object, fileauditedpermissions53_objectItemsChoices entityName) { var entity = fileAuditedPermissions53Object.GetAllObjectEntities()[entityName.ToString()]; return this.VariableEntityEvaluator.EvaluateVariableForEntity(entity); }