SyndicationCategory クラス

定義

配信フィードのカテゴリを表すクラス。

public ref class SyndicationCategory
public class SyndicationCategory
type SyndicationCategory = class
Public Class SyndicationCategory
継承
SyndicationCategory

次のコードは、SyndicationFeedを作成し、SyndicationItemSyndicationCategoryを追加する方法を示しています。

using System;
using System.ServiceModel.Syndication;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace SyndicationCategorySample
{
    class Program
    {
        static void Main(string[] args)
        {
            SyndicationFeed myFeed = new SyndicationFeed("My Test Feed",
                                                        "This is a test feed",
                                                        new Uri("http://FeedServer/Test"), "MyFeedId", DateTime.Now);
            SyndicationItem myItem = new SyndicationItem("Item One Title",
                                                         "Item One Content",
                                                         new Uri("http://FeedServer/Test/ItemOne"));
            myItem.Categories.Add(new SyndicationCategory("MyCategory"));
            Collection<SyndicationItem> items = new Collection<SyndicationItem>();
            items.Add(myItem);
            myFeed.Items = items;
        }
    }
}
Imports System.ServiceModel.Syndication
Imports System.Collections.Generic
imports System.Collections.ObjectModel


Module Program

    Sub Main()
        Dim myFeed As New SyndicationFeed("My Test Feed", _
                                                     "This is a test feed", _
                                                     New Uri("http://FeedServer/Test"), "MyFeedId", DateTime.Now)
        Dim myItem As New SyndicationItem("Item One Title", _
                                                     "Item One Content", _
                                                     New Uri("http://FeedServer/Test/ItemOne"))
        myItem.Categories.Add(New SyndicationCategory("MyCategory"))
        Dim items As New Collection(Of SyndicationItem)()
        items.Add(myItem)
        myFeed.Items = items
    End Sub

End Module

注釈

カテゴリを使用すると、情報の検索に使用できる 1 つ以上のキーワードを割り当てることができます。

コンストラクター

名前 説明
SyndicationCategory()

SyndicationCategory クラスの新しいインスタンスを初期化します。

SyndicationCategory(String, String, String)

指定した名前、スキーム、およびラベルを使用して、 SyndicationCategory クラスの新しいインスタンスを初期化します。

SyndicationCategory(String)

指定した名前を使用して、 SyndicationCategory クラスの新しいインスタンスを初期化します。

SyndicationCategory(SyndicationCategory)

指定したSyndicationCategory インスタンスを使用して、SyndicationCategory クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
AttributeExtensions

このカテゴリの属性拡張を取得します。

ElementExtensions

このカテゴリの要素拡張を取得します。

Label

カテゴリのラベルを取得または設定します。

Name

カテゴリの名前を取得または設定します。

Scheme

カテゴリのスキームを取得または設定します。

メソッド

名前 説明
Clone()

SyndicationCategory インスタンスのコピーを作成します。

Equals(Object)

指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
TryParseAttribute(String, String, String, String)

属性拡張機能の解析を試みます。

TryParseElement(XmlReader, String)

要素拡張の解析を試みます。

WriteAttributeExtensions(XmlWriter, String)

指定したライターに属性拡張を書き込みます。

WriteElementExtensions(XmlWriter, String)

指定したライターに要素拡張を書き込みます。

適用対象