/// <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); }
/// <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); }
private Uri MakePermaLinkFromCompressedTitle(Entry entry) { if (Pass(() => dasBlogSettings.SiteConfiguration.EnableTitlePermaLinkUnique, () => opts.EnableTitlePermaLinkUnique)) { return(Pass(() => new Uri(new Uri(dasBlogSettings.SiteConfiguration.Root) , dasBlogSettings.RelativeToRoot( entry.CreatedUtc.ToString("yyyyMMdd") + "/" + dasBlogSettings.GetPermaTitle(entry.CompressedTitle))) , () => new Uri(new Uri(opts.Root) , SettingsUtils.RelativeToRoot( entry.CreatedUtc.ToString("yyyyMMdd") + "/" + SettingsUtils.GetPermaTitle(entry.CompressedTitle, opts.TitlePermalinkSpaceReplacement) , opts.Root)) )); } else { return(Pass( () => new Uri(new Uri(dasBlogSettings.SiteConfiguration.Root) , dasBlogSettings.RelativeToRoot( dasBlogSettings.GetPermaTitle(entry.CompressedTitle))) , () => new Uri(new Uri(opts.Root) , SettingsUtils.RelativeToRoot( SettingsUtils.GetPermaTitle(entry.CompressedTitle, opts.TitlePermalinkSpaceReplacement), opts.Root)) )); } }
private Uri MakePermaLinkFromCompressedTitle(Entry entry) { if (opts.EnableTitlePermaLinkUnique) { return (new Uri(new Uri(opts.Root), SettingsUtils.RelativeToRoot(entry.CreatedUtc.ToString("yyyyMMdd") + "/" + SettingsUtils.GetPermaTitle(entry.CompressedTitle, opts.TitlePermalinkSpaceReplacement), opts.Root)) ); } else { return (new Uri(new Uri(opts.Root), SettingsUtils.RelativeToRoot( SettingsUtils.GetPermaTitle(entry.CompressedTitle, opts.TitlePermalinkSpaceReplacement), opts.Root))); } }