Windows Live Writer 插件开发的一点提示

Windows Live Writer 作为微软推出的免费的离线BLOG工具,在此系列中,算是佼佼者了。

更值得称道的,是它的插件支持架构,对喜欢 DIY 的开发人员,很是赞!

我自己也稀饭这个插件开发的支持,而且门槛很低,嘿嘿。我自己发布的几个插件:

http://www.zu14.cn/2008/10/23/wlw_coolemotion/

http://www.zu14.cn/2008/12/14/wlw_plugin_icontip/

http://www.zu14.cn/2009/02/10/wlw-syntax-plugin/


今天,收到一个网友的提问:

写插件的时候有办法提取到当前的登录名和blog地址吗?

答案是肯定的!

示例如下:

public string GetBlogConfig(IPublishingContext publishingContext)
{
    string 帐号 = publishingContext.AccountId;
    string 博客名 = publishingContext.BlogName;
    string 博客地址 = publishingContext.HomepageUrl;
    string 博客使用的软件 = publishingContext.ServiceName;
    //...
}

其实说白了,就是 博客的相关配置信息,都在 IPublishingContext 这个 interface 里。
posted @ 2009-02-13 09:48  三角猫  阅读(271)  评论(5编辑  收藏  举报