public AddFilmToDataBaseCommand(FilmRankingContext context, GraphicInterfaces interfaceGenerator, IReader reader, ICommandFactory factory) { this.context = context; this.interfaceGenerator = interfaceGenerator; this.reader = reader; this.writer = factory.CreateWriter("ConsoleWriter"); }
public ListMoviesInPDF(FilmRankingContext context, GraphicInterfaces interfaceGenerator, IReader reader, ICommandFactory factory) { this.context = context; this.interfaceGenerator = interfaceGenerator; this.reader = reader; this.writer = factory.CreateWriter("ConsoleWriter"); this.factory = factory; }
//DONT LOOK AT MEE IM A DISGRACE OF A SOLID PRINCIPLES AND I DO NOT DESERVE TO COMPILE // BUT http://prntscr.com/gzlqgh AND IT COULD HAVE BEEN WAYY BETTER :( private void ReadFromFiles() { using (var context = new FilmRankingContext()) { //#KOGATO ZACHUKASH NESHTO TVURDE ZDRAVO I GO HARDCODENESH :( XMLParser xmlParse = new XMLParser("../../../TextFiles/XMLFile.xml", context); xmlParse.Parse(); JSONParser jsonParse = new JSONParser("../../../TextFiles/JSONFile.JSON", context); jsonParse.Parse(); } this.writer.Write("The info from the files has been added to the database"); this.Run(); }
public XMLParser(string address, FilmRankingContext context) : base(address, context) { }
public FileParse(string address, FilmRankingContext context) { this.Address = address; this.Context = context; }