Beispiel #1
0
        /// <summary>
        /// not sure what this is about but it is legacy
        /// TODO: reconsider when strategy for handling pingback in legacy site.config is decided.
        /// </summary>
        private WeblogUpdatePingInfo MaybeBuildWeblogPingInfo()
        {
            var fakePingServices = new PingServiceCollection
            {
                new PingService
                {
                    Endpoint  = "http://ping.feedburner.com"
                    , Name    = "FeedBurner"
                    , Url     = "http://www.feedburner.com"
                    , PingApi = PingService.PingApiType.Basic
                }
            };

            return(Pass <PingServiceCollection>(
                       () => dasBlogSettings.SiteConfiguration.PingServices
                       , () => fakePingServices
                       , (a, b) => ArePingServiceCollectionsEqual((PingServiceCollection)a, (PingServiceCollection)b)
                       ).Count > 0
                                ? new WeblogUpdatePingInfo(
                       Pass(() => dasBlogSettings.SiteConfiguration.Title, () => opts.Title),
                       Pass(() => dasBlogSettings.GetBaseUrl(), () => SettingsUtils.GetBaseUrl(opts.Root)),
                       Pass(() => dasBlogSettings.GetBaseUrl(), () => SettingsUtils.GetBaseUrl(opts.Root)),
                       Pass(() => dasBlogSettings.RsdUrl, () => SettingsUtils.RelativeToRoot("feed/rsd", opts.Root)),
                       Pass <PingServiceCollection>(
                           () => dasBlogSettings.SiteConfiguration.PingServices
                           , () => fakePingServices
                           , (a, b) => ArePingServiceCollectionsEqual((PingServiceCollection)a, (PingServiceCollection)b)
                           )
                       )
                                : null);
        }
Beispiel #2
0
        /// <summary>
        /// not sure what this is about but it is legacy
        /// TODO: reconsider when strategy for handling pingback in legacy site.config is decided.
        /// </summary>
        private WeblogUpdatePingInfo MaybeBuildWeblogPingInfo()
        {
            var fakePingServices = new PingServiceCollection
            {
                new PingService
                {
                    Endpoint  = "http://ping.feedburner.com"
                    , Name    = "FeedBurner"
                    , Url     = "http://www.feedburner.com"
                    , PingApi = PingService.PingApiType.Basic
                }
            };

            return
                (fakePingServices.Count > 0
                                ? new WeblogUpdatePingInfo(
                     opts.Title,
                     SettingsUtils.GetBaseUrl(opts.Root),
                     SettingsUtils.GetBaseUrl(opts.Root),
                     SettingsUtils.RelativeToRoot("feed/rsd", opts.Root),

                     fakePingServices
                     )
                                : null);
        }