private static object ResolveValue(object value) { if (value is LookUp) { return ((LookUp) value).Key; } var list = value as IEnumerable<object>; if (list != null) { var tempList = list .Select(obj => ResolveValue(obj)) .ToList(); var typeTool = new CommonTypeTool(); var type = typeTool.GetCommonType(tempList); var arr = Array.CreateInstance(type, tempList.Count); tempList.ToArray().CopyTo(arr,0); return arr; } return value; //.ToString(); }
public void SetUp() { _theTool = new CommonTypeTool(); }