惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
V
V2EX - 技术
S
Secure Thoughts
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
S
Securelist
S
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
H
Hacker News: Front Page
Microsoft Azure Blog
Microsoft Azure Blog
I
Intezer
Google Online Security Blog
Google Online Security Blog
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
Jina AI
Jina AI
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
The Cloudflare Blog
I
InfoQ
L
LangChain Blog
U
Unit 42
P
Proofpoint News Feed
S
Schneier on Security
S
Security Affairs
Y
Y Combinator Blog
T
Tenable Blog
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
GbyAI
GbyAI
AWS News Blog
AWS News Blog

博客园 - Scott Xu(南方小鬼)

C#发现之旅第一讲 C#-XML开发 XPath Operators Basic XPath Axes Basic XPath Syntax Basic XPath Basic XSLT Basic 深入浅出之正则表达式(二) 深入浅出之正则表达式(一) My Best Loves C#(3.0) 深入浅出系列之相关概念 C#(3.0) 深入浅出系列 Expression Studio 2.0 中文版发布了 一定能影响你的简单十句话 众说不一,“八零”后程序员到底怎么了? SQL Server 2005 实用例子 你最应该雇佣的程序员的十个特征 多个检索页面,分析,Silverlight绘图 .net component 开发系列1(学习) C# 中的设计模式3:Abstract Factory(学习笔记)
通过Microsoft.Feeds获取feeds
Scott Xu(南方小鬼) · 2008-08-26 · via 博客园 - Scott Xu(南方小鬼)

今天在添加引用的时候,忽然在com里发现这么一个好东东。
 image

查了一下用法,还真是不错!

代码:

protected void Button1_Click(object sender, EventArgs e)
{
    string url = TextBox1.Text;
    if (Uri.IsWellFormedUriString(url, UriKind.Absolute))
    {
        FeedsManagerClass fmc = new FeedsManagerClass();
        IFeed feed;
        if (fmc.IsSubscribed(url))
        {
            feed = (IFeed)fmc.GetFeedByUrl(url);
        }
        else
        {
            IFeedFolder rootFolder = (IFeedFolder)fmc.RootFolder;
            feed = (IFeed)rootFolder.CreateFeed(url, url);
        }
        feed.Download();
        foreach (IFeedItem item in (IFeedsEnum)feed.Items)
        {
            Panel1.Controls.Add(new HyperLink() { Text = item.Title, NavigateUrl = item.Link });
        }
    }
    else
    {
        Panel1.Controls.Add(new Label() { Text = "url不合法" });
    }
}

这样完全省略了对feed的任何操作,凡是IE7支持的feed这里都支持!