Ejemplo n.º 1
0
 public AddFilmToDataBaseCommand(FilmRankingContext context,
                                 GraphicInterfaces interfaceGenerator,
                                 IReader reader,
                                 ICommandFactory factory)
 {
     this.context            = context;
     this.interfaceGenerator = interfaceGenerator;
     this.reader             = reader;
     this.writer             = factory.CreateWriter("ConsoleWriter");
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 //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();
 }
Ejemplo n.º 4
0
 public XMLParser(string address, FilmRankingContext context) : base(address, context)
 {
 }
Ejemplo n.º 5
0
 public FileParse(string address, FilmRankingContext context)
 {
     this.Address = address;
     this.Context = context;
 }