public CCTRow(uint level, CCEnums.CCHedaerDataType dataType, String key, object data) : this() { Level = level; DataType = dataType; Key = key; Data = data != null?data.ToString() : String.Empty; }
public CCTRow(String source, params string[] delimiters) : this() { String[] splt = source.Split(delimiters, StringSplitOptions.None); uint lvl = 0; String rowVal = splt[0] ?? String.Empty; if (uint.TryParse(rowVal, out lvl)) { CCEnums.CCHedaerDataType dtTp = (CCEnums.CCHedaerDataType)Enum.Parse(typeof(CCEnums.CCHedaerDataType), splt[1] ?? String.Empty, true); Level = lvl; DataType = dtTp; Key = splt[2]; Data = splt[3]; } else { throw new Exception("Failed parsing level as unsinged integer, value:" + rowVal); } }