public long ProcessFile(string filename) { using (FileStream fileStream = File.OpenRead(filename)) { using (StreamReader streamReader = new StreamReader(fileStream, Encoding.UTF8, true, 128)) { string line = streamReader.ReadLine(); Timeline timeline = ConvertJSONToTimeline(line); long timelineID = timeline.Id; timeline = _timelineDao.Add(timeline); Dictionary <long, long> idTranslation = new Dictionary <long, long>(); idTranslation.Add(timelineID, timeline.RootContentItemId); CreateContentitems(streamReader, line, idTranslation); return(timeline.Id); } } }
public Timeline Add(Timeline timeline) { return(_dao.Add(timeline)); }