Пример #1
0
        public void LoadProfiles()
        {
            var            data    = new DataStore();
            ILoaderFactory factory = data.GetLoaderFactory(LOADERS.XML);

            factory.Init();
            profiles = factory.GetLoader().LoadProfiles();
        }
Пример #2
0
 /// <summary>
 /// Creates new instance of <see cref="EpisodeListManager"/>
 /// </summary>
 /// <param name="logger">Instance of <see cref="ILogger"/></param>
 /// <param name="fileUtils">Instance of <see cref="IFileUtils"/></param>
 /// <param name="applicationSettingsHelper">Instance of <see cref="IApplicationSettingsHelper"/></param>
 /// <param name="loaderFactory">Instance of <see cref="ILoaderFactory"/></param>
 public EpisodeListManager(
    ILogger logger,
    IFileUtils fileUtils,
    IApplicationSettingsHelper applicationSettingsHelper,
    ILoaderFactory loaderFactory)
 {
     this.loaderFactory = loaderFactory;
     this.applicationSettingsHelper = applicationSettingsHelper;
     this.fileUtils = fileUtils;
     this.logger = logger;
     Initialization = initializeAsync();
 }
Пример #3
0
        public void SaveSettings()
        {
            foreach (Profile profile in profiles)
            {
                profile.PrepareSave();
            }
            var            data    = new DataStore();
            ILoaderFactory factory = data.GetLoaderFactory(LOADERS.XML);

            factory.Init();
            factory.GetLoader().SaveProfiles(profiles);
        }
        /// <summary>
        ///     Creates page factory instance using provided <paramref name="proxyFactory"/> for creating proxies
        ///     and <paramref name="loaderFactory"/> for creating lazy elements and list of elements.
        /// </summary>
        /// <param name="proxyFactory"></param>
        /// <param name="loaderFactory"></param>
        public PageObjectFactory(IProxyFactory proxyFactory, ILoaderFactory loaderFactory)
        {
            if (proxyFactory == null)
            {
                throw new ArgumentNullException("proxyFactory");
            }

            if (loaderFactory == null)
            {
                throw new ArgumentNullException("loaderFactory");
            }

            _proxyFactory = proxyFactory;
            _loaderFactory = loaderFactory;
        }
        /// <summary>
        ///     Creates page factory instance using provided <paramref name="proxyFactory"/> for creating proxies
        ///     and <paramref name="loaderFactory"/> for creating lazy elements and list of elements.
        /// </summary>
        /// <param name="proxyFactory">
        ///     Factory creating WebElement and WebElement list proxies.
        /// </param>
        /// <param name="loaderFactory">
        ///     Factory creating WebElement and WebElement list loaders.
        /// </param>
        public PageObjectFactory(IProxyFactory proxyFactory, ILoaderFactory loaderFactory)
        {
            if (proxyFactory == null)
            {
                throw new ArgumentNullException("proxyFactory");
            }

            if (loaderFactory == null)
            {
                throw new ArgumentNullException("loaderFactory");
            }

            _proxyFactory  = proxyFactory;
            _loaderFactory = loaderFactory;
        }
Пример #6
0
        /// <summary>
        /// Creates new instance of <see cref="DownloadManager"/>
        /// </summary>
        /// <param name="logger">Instance of <see cref="ILogger"/></param>
        /// <param name="playlist">Instance of <see cref="IPlayList"/></param>
        /// <param name="loaderFactory">Instance of <see cref="ILoaderFactory"/></param>
        /// <param name="parser">Instance of <see cref="IParser"/></param>
        /// <param name="fileUtils">Instance of <see cref="IFileUtils"/></param>
        public DownloadManager(
            ILogger logger,
            ILoaderFactory loaderFactory,
            IParser parser,
            IApplicationSettingsHelper applicationSettingsHelper,
            IFileUtils fileUtils)
        {
            this.logger = logger;
            this.loaderFactory = loaderFactory;
            this.parser = parser;
            this.applicationSettingsHelper = applicationSettingsHelper;
            this.fileUtils = fileUtils;

            Initialization = RetrieveActiveDownloads();
            logger.LogMessage("DownloadManager: Initialized.", LoggingLevel.Information);
        }
Пример #7
0
        protected virtual void _loadImp(int priority = 0, bool progress = false, uint retryCount = 0)
        {
            if (loader == null)
            {
                if (LoaderFactory == null)
                {
                    LoaderFactory = new ResourceLoaderManager();
                }
                loader = LoaderFactory.getLoader(this);
            }
            loader.checkProgress = progress;
            loader.retryCount    = retryCount;

            AssetsManager.bindEventHandle(loader, loadComplete);
            if (progress)
            {
                loader.addEventListener(EventX.PROGRESS, progressHandle);
            }
            loader.addEventListener(EventX.CANCEL, loadCancelHandle);
            AbstractApp.coreLoaderQueue.add(loader);
        }
Пример #8
0
 /// <summary>
 /// Creates page factory instance using provided <paramref name="proxyFactory"/> for creating
 /// proxies and <paramref name="loaderFactory"/> for creating lazy elements and list of elements.
 /// </summary>
 /// <param name="proxyFactory">Factory creating WebElement and WebElement list proxies.</param>
 /// <param name="loaderFactory">Factory creating WebElement and WebElement list loaders.</param>
 public PageObjectFactory(IProxyFactory proxyFactory, ILoaderFactory loaderFactory)
 {
     _proxyFactory  = proxyFactory ?? throw new ArgumentNullException(nameof(proxyFactory));
     _loaderFactory = loaderFactory ?? throw new ArgumentNullException(nameof(loaderFactory));
 }
Пример #9
0
 /// <summary>
 /// Creates page factory instance using <see cref="ProxyFactory"/> for creating lazy loading
 /// error handling proxies and <see cref="LoaderFactory"/> for creating lazy loaded elements and
 /// element lists.
 /// </summary>
 public PageObjectFactory()
 {
     _proxyFactory  = new ProxyFactory();
     _loaderFactory = new LoaderFactory(this, _proxyFactory);
 }
 /// <summary>
 ///     Creates page factory instance using <see cref="ProxyFactory"/> for creating lazy loading error handling proxies
 ///     and <see cref="LoaderFactory"/> for creating lazy loaded elements and element lists.
 /// </summary>
 public PageObjectFactory()
 {
     _proxyFactory = new ProxyFactory();
     _loaderFactory = new LoaderFactory(this, _proxyFactory);
 }
Пример #11
0
 public GenericDataFactory(ILoaderFactory loaderFactory)
 {
     this.LoaderFactory = LoaderFactory;
 }
Пример #12
0
 public GenericDataFactory()
 {
     this.LoaderFactory = new LoaderFactory();
 }
Пример #13
0
 public static void RegisterPriority([NotNull] ILoaderFactory factory)
 {
     Factories.Insert(0, factory);
 }
Пример #14
0
 public static void Unregister([NotNull] ILoaderFactory factory)
 {
     Factories.Remove(factory);
 }
Пример #15
0
 public GenericDataFactory(ILoaderFactory loaderFactory)
 {
     LoaderFactory = loaderFactory;
 }
 protected BlobStorageBase(ILoaderFactory loaderFactory)
 {
     LoaderFactory = loaderFactory;
 }
 public LocalNewGameProvider(ILoaderFactory loaderFactory)
 {
     _loaderFactory = loaderFactory;
 }
Пример #18
0
 public static void Register([NotNull] ILoaderFactory factory)
 {
     Factories.Add(factory);
 }
Пример #19
0
 public SitePriceCollector(IResultSaver saver, IParseConfig parseConfig, ILoaderFactory loaderFactory)
 {
     _saver         = saver;
     _parseConfig   = parseConfig;
     _loaderFactory = loaderFactory;
 }
Пример #20
0
 public FileSystemBlobStorage(string root, ILoaderFactory loaderFactory) : base(loaderFactory)
 {
     _root = root;
 }
 public LocalGamePersistence(ILoaderFactory loaderFactory, string saveDirectory)
 {
     _loaderFactory = loaderFactory;
     _saveDirectory = saveDirectory;
 }