示例#1
0
 public TourManagerImp(bool mockDatabase = false)
 {
     if (!mockDatabase)
     {
         tourItemDAO = new TourItemDAO();
     }
     else
     {
         tourItemDAO = new TourItemDAO(true);
     }
 }
示例#2
0
 public void ChangeDataSource(int source)
 {
     try
     {
         log.Info($"Try to change DataSource");
         tourItemDAO = new TourItemDAO(source);
     }
     catch (Exception e)
     {
         log.Error($"Error occoured after trying to Change DataSource \n Details: {e}");
         Console.WriteLine(e);
     }
 }
示例#3
0
 public TourItemFactoryImpl()
 {
     tourItemDatabase   = new TourItemDAO(DataType.Database);
     tourItemFileSystem = new TourItemDAO(DataType.Filesystem);
 }
示例#4
0
 public TourItemFactoryImpl()
 {
     databaseTourItemDAO   = new TourItemDAO(DataType.Database);
     filesystemTourItemDAO = new TourItemDAO(DataType.Filesystem);
 }