public object GetGenericValue(ICell cell, TypeInfo type) { if (ReadHelper.IsLinkCell(cell)) { switch (type.genericType.sign) { case TypeInfo.Sign.Array: return(ReadLinkArray(cell, type.genericArguments[0])); case TypeInfo.Sign.List: return(ReadLinkList(cell, type.genericArguments[0])); case TypeInfo.Sign.Dictionary: return(ReadLinkDict(cell, null)); default: return(null); } } else { if (cell != null) { //as json data return(Newtonsoft.Json.JsonConvert.DeserializeObject(cell.StringCellValue, type.ToSystemType())); } else { return(null); } } }
public object GetObjectValue(ICell cell, TypeInfo type) { if (ReadHelper.IsLinkCell(cell)) { return(ReadLinkObject(cell, type)); } else { //as json data return(Newtonsoft.Json.JsonConvert.DeserializeObject(cell.StringCellValue, type.ToSystemType())); } }