private IEnumerable <VariableValue> GetVariableValuesFrom(CollectRequest collectRequest, IDocumentSession session) { List <VariableValue> variableValues = new List <VariableValue>(); VariableType[] variables = collectRequest.GetOvalVariables(session).ToArray(); VariableEvaluator variableEvaluator = new VariableEvaluator(variables, collectRequest.GetSystemCharacteristics(session), collectRequest.GetExternalVariables()); foreach (VariableType variable in collectRequest.GetOvalVariables(session)) { IEnumerable <string> valuesOfVariable = variableEvaluator.EvaluateVariable(variable.id); IEnumerable <ObjectType> objectsByVariable = collectRequest.GetObjectTypesByVariableId(session, variable.id); variableValues.AddRange(this.CreateVariableValuesFrom(objectsByVariable, variable.id, valuesOfVariable)); IEnumerable <StateType> statesByVariable = collectRequest.GetStateTypeByVariableId(session, variable.id); variableValues.AddRange(this.CreateVariableValuesFrom(statesByVariable, variable.id, valuesOfVariable)); } return(variableValues); }