public virtual IEnumerable<ItemType> GetItemsToCollect(OVAL.Definitions.ObjectType objectType, VariablesEvaluated variables) { var variableNameEntity = ((environmentvariable_object)objectType).GetEnvironmentVariableNameEntity(); var variableNameValues = this.EvaluateVariable(variableNameEntity, variables); var itemsToCollect = new List<ItemType>(); foreach (var variableName in variableNameValues) { var newItemToCollect = new environmentvariable_item() { name = OvalHelper.CreateItemEntityWithStringValue(variableName) }; itemsToCollect.Add(newItemToCollect); } return itemsToCollect; }
private CollectedItem GetFakeCollectedItem() { var newCollectedItem = new environmentvariable_item() { name = OvalHelper.CreateItemEntityWithStringValue(FAKE_ENVIRONMENT_VARIABLE_NAME), value = OvalHelper.CreateEntityItemAnyTypeWithValue(FAKE_ENVIRONMENT_VARIABLE_VALUE) }; return ProbeHelper.CreateFakeCollectedItem(newCollectedItem); }