private IEnumerable <string> EvaluateOperation(OperationEnumeration operation, string entityValue, RegistryObject registryObject, bool isKeyEntity) { IEnumerable <string> valuesToMatch = null; if (operatorHelper.IsRegularExpression(operation)) { if (isKeyEntity) { valuesToMatch = this.getSubKeysRecursive(registryObject.Hive, registryObject.Key); } else { registryObject.ClearNameEntity(); valuesToMatch = this.getKeyValues(registryObject); } return(new MultiLevelPatternMatchOperation(FamilyEnumeration.windows).applyPatternMatch(entityValue, valuesToMatch)); } else { valuesToMatch = this.GetValuesToMatchForOperationsDifferentsOfPatternMatch(isKeyEntity, registryObject); return(NonPatternMatchOperationEvaluator. EvaluateOperationsDifferentsOfPatternMatch(operation, entityValue, valuesToMatch)); } }
private IEnumerable <string> processKey(string entityValue) { if (this.KeyObjectEntity.operation == OperationEnumeration.patternmatch) { return(this.getSubKeysApplyingPatternMatch(this.HiveObjectEntity.Value, entityValue)); } if (this.KeyObjectEntity.operation == OperationEnumeration.equals) { return(new List <String>(new string[] { entityValue })); } string startKeyPath = this.RemoveLastLevelOfKeyPath(entityValue); var valuesToMatch = this.EnumerateSubKeys(startKeyPath); return(NonPatternMatchOperationEvaluator .EvaluateOperationsDifferentsOfPatternMatch(this.KeyObjectEntity.operation, entityValue, valuesToMatch)); }