public object MapField(BigEndianBinaryReader reader, DatasetSource ds, CarTimestamp ct) { object val = MapData(ReadData(reader)); if (!string.IsNullOrEmpty(dsitem) && ds != null) { IDataItemSource di; if (!ds.TryGetValue(dsitem, out di)) { Type digType = typeof(DataItemSource <>); Type diType = digType.MakeGenericType(outtype); DataItemDescriptor desc = new DataItemDescriptor(dsitem, outtype, null, null, 250); di = (IDataItemSource)Activator.CreateInstance(diType, desc); ds.Add(dsitem, di); } di.Add(val, ct); } return(val); }
public object MapField(BigEndianBinaryReader reader, DatasetSource ds, CarTimestamp ct) { object val = MapData(ReadData(reader)); if (!string.IsNullOrEmpty(dsitem) && ds != null) { IDataItemSource di; if (!ds.TryGetValue(dsitem, out di)) { Type digType = typeof(DataItemSource<>); Type diType = digType.MakeGenericType(outtype); DataItemDescriptor desc = new DataItemDescriptor(dsitem, outtype, null, null, 250); di = (IDataItemSource)Activator.CreateInstance(diType, desc); ds.Add(dsitem, di); } di.Add(val, ct); } return val; }