SyndicationCategory Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy SyndicationCategory.

Przeciążenia

SyndicationCategory()

Inicjuje nowe wystąpienie klasy SyndicationCategory.

SyndicationCategory(SyndicationCategory)

Inicjuje SyndicationCategory nowe wystąpienie klasy z określonym SyndicationCategory wystąpieniem.

SyndicationCategory(String)

Inicjuje SyndicationCategory nowe wystąpienie klasy o podanej nazwie.

SyndicationCategory(String, String, String)

Inicjuje SyndicationCategory nowe wystąpienie klasy o określonej nazwie, schemacie i etykiecie.

SyndicationCategory()

Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs

Inicjuje nowe wystąpienie klasy SyndicationCategory.

public:
 SyndicationCategory();
public SyndicationCategory ();
Public Sub New ()

Dotyczy

SyndicationCategory(SyndicationCategory)

Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs

Inicjuje SyndicationCategory nowe wystąpienie klasy z określonym SyndicationCategory wystąpieniem.

protected:
 SyndicationCategory(System::ServiceModel::Syndication::SyndicationCategory ^ source);
protected SyndicationCategory (System.ServiceModel.Syndication.SyndicationCategory source);
new System.ServiceModel.Syndication.SyndicationCategory : System.ServiceModel.Syndication.SyndicationCategory -> System.ServiceModel.Syndication.SyndicationCategory
Protected Sub New (source As SyndicationCategory)

Parametry

source
SyndicationCategory

Wystąpienie SyndicationCategory do zainicjowania nowego SyndicationCategory wystąpienia.

Dotyczy

SyndicationCategory(String)

Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs

Inicjuje SyndicationCategory nowe wystąpienie klasy o podanej nazwie.

public:
 SyndicationCategory(System::String ^ name);
public SyndicationCategory (string name);
new System.ServiceModel.Syndication.SyndicationCategory : string -> System.ServiceModel.Syndication.SyndicationCategory
Public Sub New (name As String)

Parametry

name
String

Nazwa kategorii.

Przykłady

Poniższy kod pokazuje, jak utworzyć element SyndicationFeed i dodać element SyndicationItem za pomocą elementu 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

Dotyczy

SyndicationCategory(String, String, String)

Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs
Źródło:
SyndicationCategory.cs

Inicjuje SyndicationCategory nowe wystąpienie klasy o określonej nazwie, schemacie i etykiecie.

public:
 SyndicationCategory(System::String ^ name, System::String ^ scheme, System::String ^ label);
public SyndicationCategory (string name, string scheme, string label);
new System.ServiceModel.Syndication.SyndicationCategory : string * string * string -> System.ServiceModel.Syndication.SyndicationCategory
Public Sub New (name As String, scheme As String, label As String)

Parametry

name
String

Nazwa kategorii.

scheme
String

Jednolity identyfikator zasobu (URI), który reprezentuje schemat kategoryzacji, do którego należy ta kategoria.

label
String

Atrybut czytelny dla człowieka, który opisuje kategorię.

Przykłady

Poniższy kod pokazuje, jak wywołać ten konstruktor.

SyndicationCategory category = new SyndicationCategory("MyCategory", "http://contoso/MyCategory", "Contoso Category");
Dim category As New SyndicationCategory("MyCategory", "http://contoso/MyCategory", "Contoso Category")

Dotyczy