C# Class BlogEngine.Core.SyndicationGenerator

Generates syndication feeds for blog entities.
Mostrar archivo Open project: rasmuskl/ReSharperCourse Class Usage Examples

Private Properties

Property Type Description
FormatW3COffset string
GetEnclosure string
GetMediaEnclosure string
GetPermaLink System.Uri
ToW3CDateTime string
ValidateFileName string
WriteAtomContent void
WriteAtomContentCommonElements void
WriteAtomEntry void
WriteAtomFeed void
WriteRssChannel void
WriteRssChannelCommonElements void
WriteRssFeed void
WriteRssItem void

Public Methods

Method Description
SyndicationGenerator ( BlogSettings settings, List categories ) : System

Initializes a new instance of the SyndicationGenerator class using the supplied BlogSettings and collection of Category objects.

ToRfc822DateTime ( System.DateTime dateTime ) : string

Converts the supplied DateTime to its equivalent RFC-822 DateTime string representation.

WriteFeed ( SyndicationFormat format, Stream stream, List publishables, string title ) : void

Writes a generated syndication feed that conforms to the supplied SyndicationFormat using the supplied Stream and collection.

Private Methods

Method Description
FormatW3COffset ( System.TimeSpan offset, string separator ) : string

Converts the value of the specified TimeSpan to its equivalent string representation.

GetEnclosure ( string content, IPublishable publishable ) : string

Gets enclosure for supported media type

GetMediaEnclosure ( IPublishable publishable, string content, string media, string mediatype ) : string

Gets enclosure for supported media type

GetPermaLink ( IPublishable publishable ) : Uri

Creates a Uri that represents the peramlink for the supplied IPublishable.

ToW3CDateTime ( System.DateTime utcDateTime ) : string

Converts the supplied DateTime to its equivalent W3C DateTime string representation.

ValidateFileName ( IPublishable publishable, string fileName ) : string

Validates the name of the file.

WriteAtomContent ( XmlWriter writer, List publishables, string title ) : void

Writes the Atom feed element information to the specified XmlWriter using the supplied collection.

WriteAtomContentCommonElements ( XmlWriter writer ) : void

Writes the common/shared Atom feed element information to the specified XmlWriter.

WriteAtomEntry ( XmlWriter writer, IPublishable publishable ) : void

Writes the Atom feed entry element information to the specified XmlWriter using the supplied Page.

WriteAtomFeed ( Stream stream, List publishables, string title ) : void

Writes a generated Atom syndication feed to the specified Stream using the supplied collection.

WriteRssChannel ( XmlWriter writer, IEnumerable publishables, string title ) : void

Writes the RSS channel element information to the specified XmlWriter using the supplied collection.

WriteRssChannelCommonElements ( XmlWriter writer ) : void

Writes the common/shared RSS channel element information to the specified XmlWriter.

WriteRssFeed ( Stream stream, IEnumerable publishables, string title ) : void

Writes a generated RSS syndication feed to the specified Stream using the supplied collection.

WriteRssItem ( XmlWriter writer, IPublishable publishable ) : void

Writes the RSS channel item element information to the specified XmlWriter using the supplied Page.

Method Details

SyndicationGenerator() public method

Initializes a new instance of the SyndicationGenerator class using the supplied BlogSettings and collection of Category objects.
public SyndicationGenerator ( BlogSettings settings, List categories ) : System
settings BlogSettings /// The to use when generating syndication results. ///
categories List /// A collection of objects used to categorize the web log content. ///
return System

ToRfc822DateTime() public static method

Converts the supplied DateTime to its equivalent RFC-822 DateTime string representation.
public static ToRfc822DateTime ( System.DateTime dateTime ) : string
dateTime System.DateTime /// The to convert. ///
return string

WriteFeed() public method

Writes a generated syndication feed that conforms to the supplied SyndicationFormat using the supplied Stream and collection.
public WriteFeed ( SyndicationFormat format, Stream stream, List publishables, string title ) : void
format SyndicationFormat /// A enumeration value indicating the syndication format to generate. ///
stream Stream /// The to which you want to write the syndication feed. ///
publishables List /// The collection of objects used to generate the syndication feed content. ///
title string /// The title of the RSS channel ///
return void