Beispiel #1
0
        public FoOlSlide(FoOlSlideConfig configuration)
        {
            if (string.IsNullOrEmpty(configuration.Name))
                throw new ArgumentException("Name must not be null or empty.", "configuration");
            if (configuration.ScraperGuid == Guid.Empty)
                throw new ArgumentException("ScraperGuid must not be empty.", "configuration");
            if (string.IsNullOrEmpty(configuration.BaseUrl))
                throw new ArgumentException("BaseUrl must not be null or empty.", "configuration");
            if (string.IsNullOrEmpty(configuration.DirectoryUrl))
                throw new ArgumentException("DirectoryUrl must not be null or empty.", "configuration");

            _configuration = (FoOlSlideConfig)configuration.Clone();

            _cache = new Cache<string, object>();
            HtmlAgilityPack.HtmlNode.ElementsFlags.Remove("option");
        }
Beispiel #2
0
        public FoOlSlide(FoOlSlideConfig configuration)
        {
            if (string.IsNullOrEmpty(configuration.Name))
            {
                throw new ArgumentException("Name must not be null or empty.", "configuration");
            }
            if (configuration.ScraperGuid == Guid.Empty)
            {
                throw new ArgumentException("ScraperGuid must not be empty.", "configuration");
            }
            if (string.IsNullOrEmpty(configuration.BaseUrl))
            {
                throw new ArgumentException("BaseUrl must not be null or empty.", "configuration");
            }
            if (string.IsNullOrEmpty(configuration.DirectoryUrl))
            {
                throw new ArgumentException("DirectoryUrl must not be null or empty.", "configuration");
            }

            _configuration = (FoOlSlideConfig)configuration.Clone();

            _cache = new Cache <string, object>();
            HtmlAgilityPack.HtmlNode.ElementsFlags.Remove("option");
        }