BSky.Statistics.R.RCommandStrings.AddColumnLevels C# (CSharp) Method

AddColumnLevels() public static method

public static AddColumnLevels ( string colName, List finalLevelList, ServerDataSource dataSource ) : string
colName string
finalLevelList List
dataSource BSky.Statistics.Common.ServerDataSource
return string
        public static string AddColumnLevels(string colName, List<string> finalLevelList, ServerDataSource dataSource)
        {
            string oldLevels = "c(";
            string newLevels = "c(";
            int i = 0;
            foreach (string vllst in finalLevelList)
            {
                if (vllst != null)
                {
                    if (i < finalLevelList.Count - 1)//put comma
                    {
                        //oldLevels = oldLevels + "\'" + vllst.Trim() + "\',";
                        newLevels = newLevels + "\'" + vllst + "\',";
                    }
                    else
                    {
                        //oldLevels = oldLevels + "\'" + vllst.OriginalLevel.Trim() + "\')";
                        newLevels = newLevels + "\'" + vllst + "\')";
                    }
                    i++;
                }
            }
            return string.Format("BSkyAddLevels(colNameOrIndex='{0}', newLevels={1}, dataSetNameOrIndex='{2}')", colName, newLevels, dataSource.Name);
        }