/// <summary> /// Convert a list of web factor field enumeration instances /// to a list of factor field enumeration instances. /// </summary> /// <param name="userContext"> /// Information about the user that makes this method call. /// </param> /// <param name="webFactorFieldEnums">List of factor field enumeration instances.</param> /// <returns>Factor field enumerations.</returns> private FactorFieldEnumList GetFactorFieldEnums(IUserContext userContext, List <WebFactorFieldEnum> webFactorFieldEnums) { FactorFieldEnumList factorFieldEnums; factorFieldEnums = null; if (webFactorFieldEnums.IsNotEmpty()) { factorFieldEnums = new FactorFieldEnumList(); foreach (WebFactorFieldEnum webFactorFieldEnum in webFactorFieldEnums) { factorFieldEnums.Add(GetFactorFieldEnum(userContext, webFactorFieldEnum)); } factorFieldEnums.Sort(); foreach (IFactorFieldEnum factorFieldEnum in factorFieldEnums) { factorFieldEnum.Values.Sort(); } } return(factorFieldEnums); }