コード例 #1
0
 public BlogPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount, IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader)
 {
     _blogClient = blogClient;
     _blogAccount = blogAccount;
     _credentials = credentials;
     _blogHomepageUrl = blogHomepageUrl;
     _pageDownloader = pageDownloader;
 }
コード例 #2
0
        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);

        }
コード例 #3
0
 public static IBlogClient CreateClient(BlogAccount blogAccount, IBlogCredentialsAccessor credentials)
 {
     return CreateClient(blogAccount.ClientType, blogAccount.PostApiUrl, credentials);
 }
コード例 #4
0
 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);
 }
コード例 #5
0
        /// <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;
        }
コード例 #6
0
 public TemporaryPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount,
     IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader, BlogPostRegionLocatorBooleanCallback promptForTempPost)
     : base(blogClient, blogAccount, credentials, blogHomepageUrl, pageDownloader)
 {
     this.containsBlogPosts = promptForTempPost;
 }
コード例 #7
0
 public RecentPostRegionLocatorStrategy(IBlogClient blogClient, BlogAccount blogAccount,
     IBlogCredentialsAccessor credentials, string blogHomepageUrl, PageDownloader pageDownloader)
     : base(blogClient, blogAccount, credentials, blogHomepageUrl, pageDownloader)
 {
 }