Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
 public Timeline Add(Timeline timeline)
 {
     return(_dao.Add(timeline));
 }