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

설명

범주를 사용하면 정보를 검색하는 데 사용할 수 있는 하나 이상의 키워드를 할당할 수 있습니다.

생성자

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)

지정된 작성기에 요소 확장을 씁니다.

적용 대상