SyndicationCategory クラス

定義

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

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

次のコードは、SyndicationFeed を作成し、SyndicationItem と一緒に SyndicationCategory を追加する方法を示しています。

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)

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

SyndicationCategory(String, String, 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)

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

適用対象