public BlogPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount, IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader) { _blogClient = blogClient; _blogAccount = blogAccount; _credentials = credentials; _blogHomepageUrl = blogHomepageUrl; _pageDownloader = pageDownloader; }
private void DetectWeblogSettingsCompleted(object result) { // no-op if we don't have a blog detected if (HostBlogId == String.Empty) return; // get the editing template directory string blogTemplateDir = BlogEditingTemplate.GetBlogTemplateDir(_localBlogId); // set context for template detector BlogAccount blogAccount = new BlogAccount(ServiceName, ClientType, PostApiUrl, HostBlogId); _blogEditingTemplateDetector.SetContext(blogAccount, _credentials, _homepageUrl, blogTemplateDir, _manifestDownloadInfo, false, _providerId, _optionOverrides, null, _homePageOverrides); }
public static IBlogClient CreateClient(BlogAccount blogAccount, IBlogCredentialsAccessor credentials) { return CreateClient(blogAccount.ClientType, blogAccount.PostApiUrl, credentials); }
public BlogEditingTemplateDetector(IBlogClientUIContext uiContext, Control parentControl, IBlogSettingsAccessor blogSettings, bool probeForManifest) : this(uiContext, parentControl) { BlogAccount blogAccount = new BlogAccount(blogSettings.ServiceName, blogSettings.ClientType, blogSettings.PostApiUrl, blogSettings.HostBlogId); string blogTemplateDir = BlogEditingTemplate.GetBlogTemplateDir(blogSettings.Id); SetContext(blogAccount, blogSettings.Credentials, blogSettings.HomepageUrl, blogTemplateDir, blogSettings.ManifestDownloadInfo, probeForManifest, blogSettings.ProviderId, blogSettings.OptionOverrides, blogSettings.UserOptionOverrides, blogSettings.HomePageOverrides); }
/// <summary> /// SetContext using a weblog account /// </summary> public void SetContext(BlogAccount blogAccount, IBlogCredentialsAccessor credentials, string blogHomepageUrl, string blogTemplateDir, WriterEditingManifestDownloadInfo manifestDownloadInfo, bool probeForManifest, string providerId, IDictionary optionOverrides, IDictionary userOptionOverrides, IDictionary homepageOptionOverrides) { // note context set _contextSet = true; // create a blog client _blogAccount = blogAccount; _credentials = credentials; _blogClient = BlogClientManager.CreateClient(blogAccount.ClientType, blogAccount.PostApiUrl, credentials, providerId, optionOverrides, userOptionOverrides, homepageOptionOverrides); // set other context that we've got _blogHomepageUrl = blogHomepageUrl; _blogTemplateDir = blogTemplateDir; _manifestDownloadInfo = manifestDownloadInfo; _probeForManifest = probeForManifest; }
public TemporaryPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount, IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader, BlogPostRegionLocatorBooleanCallback promptForTempPost) : base(blogClient, blogAccount, credentials, blogHomepageUrl, pageDownloader) { this.containsBlogPosts = promptForTempPost; }
public RecentPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount, IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader) : base(blogClient, blogAccount, credentials, blogHomepageUrl, pageDownloader) { }