예제 #1
0
        /// <summary>
        /// Load feed options using the given option keys
        /// </summary>
        /// <param name="settingKeys">Feed Option Setting Keys</param>
        public void Load(IFeedOptionKeys settingKeys)
        {
            StoreSettingCollection settings = Token.Instance.Store.Settings;

            _CompressedFeedFileName = settings.GetValueByKey(settingKeys.CompressedFeedFileName);
            _FeedDataPath           = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\Feeds");
            _FeedFileName           = settings.GetValueByKey(settingKeys.FeedFileName);
            _FtpHost                 = settings.GetValueByKey(settingKeys.FtpHost);
            _FtpPassword             = settings.GetValueByKey(settingKeys.FtpPassword);
            _FtpUser                 = settings.GetValueByKey(settingKeys.FtpUser);
            _IncludeAllProducts      = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.IncludeAllProducts), false);
            _OverwriteCompressedFile = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.OverwriteCompressedFile), true);
            _OverwriteFeedFile       = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.OverwriteFeedFile), true);
            _RemoteFileName          = settings.GetValueByKey(settingKeys.RemoteFileName);
            IsDirty = false;
        }
예제 #2
0
        public void Load(ISiteMapOptionKeys settingKeys)
        {
            StoreSettingCollection settings = Token.Instance.Store.Settings;

            _CompressedSiteMapFileName = settings.GetValueByKey(settingKeys.CompressedSiteMapFileName);
            _SiteMapDataPath           = settings.GetValueByKey(settingKeys.SiteMapDataPath);
            _SiteMapFileName           = settings.GetValueByKey(settingKeys.SiteMapFileName);
            _IncludeProducts           = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.IncludeProducts), true);
            _IncludeCategories         = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.IncludeCategories), true);
            _IncludeWebpages           = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.IncludeWebpages), true);
            _OverwriteCompressedFile   = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.OverwriteCompressedFile), true);
            _OverwriteSiteMapFile      = AlwaysConvert.ToBool(settings.GetValueByKey(settingKeys.OverwriteSiteMapFile), true);
            _DefaultChangeFrequency    = (changefreq)AlwaysConvert.ToEnum(typeof(changefreq), settings.GetValueByKey(settingKeys.DefaultChangeFrequency), changefreq.weekly);
            _DefaultUrlPriority        = AlwaysConvert.ToDecimal(settings.GetValueByKey(settingKeys.DefaultUrlPriority), 0.5M);
            IsDirty = false;
        }