C# Класс newtelligence.DasBlog.Runtime.CommentFile

Comments collections stored on the file system.
This class uses the allcomments.xml file in the root. The user of the class is expected to use the add and/or add range methods to (re)create the file.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddComment ( Comment comment ) : void

Adds the comment to the all comments file.

CommentFile ( string contentBaseDirectory ) : System

Creates a new instance of the CommentFile class.

DeleteComment ( string commentId ) : void
GetLastCommentUpdate ( ) : System.DateTime

Returns the last time the allcomments.xml file was writen too in UTC.

LoadComments ( ) : CommentCollection

Loads the comment collection from the file system.

Rebuild ( ) : void
UpdateComment ( Comment comment ) : void

Updates a comment in the all comments file.

Приватные методы

Метод Описание
SaveComments ( CommentCollection comments ) : void

Описание методов

AddComment() публичный Метод

Adds the comment to the all comments file.
public AddComment ( Comment comment ) : void
comment Comment The comment to add.
Результат void

CommentFile() публичный Метод

Creates a new instance of the CommentFile class.
public CommentFile ( string contentBaseDirectory ) : System
contentBaseDirectory string The directory to load the content from.
Результат System

DeleteComment() публичный Метод

public DeleteComment ( string commentId ) : void
commentId string
Результат void

GetLastCommentUpdate() публичный Метод

Returns the last time the allcomments.xml file was writen too in UTC.
public GetLastCommentUpdate ( ) : System.DateTime
Результат System.DateTime

LoadComments() публичный Метод

Loads the comment collection from the file system.
public LoadComments ( ) : CommentCollection
Результат CommentCollection

Rebuild() публичный Метод

public Rebuild ( ) : void
Результат void

UpdateComment() публичный Метод

Updates a comment in the all comments file.
public UpdateComment ( Comment comment ) : void
comment Comment The new version of the comment.
Результат void