Ejemplo n.º 1
0
        public Tests()
        {
            TestMethods = new Dictionary <String, Func <String, Task> >()
            {
                { "search", async(SearchTerm) => {
                      logger.InfoFormat("Searching for {0}...", SearchTerm);
                      List <MangaObject> results = await Test_Search(SearchTerm);

                      logger.InfoFormat("Searching for {0}...DONE!", SearchTerm);

                      foreach (MangaObject mObj in results)
                      {
                          logger.InfoFormat("* {0}", mObj.Name);
                          foreach (LocationObject lObj in mObj.Locations)
                          {
                              logger.InfoFormat("** {0} ({1})", lObj.ExtensionName, lObj.ExtensionLanguage);
                          }
                      }
                  } }
            };

            ConfigureLog4Net();
            InitializeDLLs();
            ContentDownloadManager = new ContentDownloadManager(CORE: CORE);
        }
Ejemplo n.º 2
0
        public App()
        {
            AssemblyInfo = new AssemblyInformation();

            // Configure log4net
            ConfigureLog4Net();

            // Handle unhandled exceptions
            DispatcherUnhandledException += App_DispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            // Initialize Collection
            MangaCacheObjects = new ObservableCollection <MangaCacheObject>();

            // Create a File System Watcher for Manga Objects
            MangaObjectArchiveWatcher = new FileSystemWatcher(CORE.MANGA_ARCHIVE_DIRECTORY, CORE.MANGA_ARCHIVE_FILTER);
            MangaObjectArchiveWatcher.EnableRaisingEvents = false;

            // Create a File System Watcher for Manga Chapter Objects
            ChapterObjectArchiveWatcher = new FileSystemWatcher(CORE.CHAPTER_ARCHIVE_DIRECTORY, CORE.CHAPTER_ARCHIVE_FILTER);
            ChapterObjectArchiveWatcher.IncludeSubdirectories = true;
            ChapterObjectArchiveWatcher.EnableRaisingEvents   = false;

            // Load UserConfig
            LoadUserConfig();
            SerializeType = CORE.UserConfiguration.SerializeType;

            // Initialize the ContentDownloadManager v2
            ContentDownloadManager = new ContentDownloadManager(CORE: CORE);

            Startup += App_Startup;
            Exit    += App_Exit;

            InitializeComponent();
        }