public bool ParseInputFile() { try { _magazine = MagazineType.LoadFromFile(_inputFile); if (_magazine == null) { Console.Error.WriteLine("Erreur lors de la lecture du fichier d'entré"); return(false); } else { if (_magazine.Couverture != null && _magazine.Couverture.Articles != null) { for (int i = 0; i < _magazine.Couverture.Articles.Count; ++i) { string articleRef = _magazine.Couverture.Articles[i].Ref; ArticleType article = _magazine.GetArticleByID(articleRef); _magazine.Couverture.Articles[i] = article; } } return(true); } } catch (Exception ex) { Console.Error.WriteLine(ex.FullTrace()); return(false); } }
private GeneratorEPub(Generator generator, MagazineType magazine) { string epubFileName = String.Format("mag{0}.epub", magazine.Numero); _outputZipFileName = Path.Combine(generator.RootDirectory.FullName, epubFileName); _generator = generator; _magazine = magazine; }
public static GeneratorEPub Create(Generator generator, MagazineType magazine) { return(new GeneratorEPub(generator, magazine)); }