C# Class 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.
Afficher le fichier Open project: AArnott/dasblog Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
SaveComments ( CommentCollection comments ) : void

Method Details

AddComment() public méthode

Adds the comment to the all comments file.
public AddComment ( Comment comment ) : void
comment Comment The comment to add.
Résultat void

CommentFile() public méthode

Creates a new instance of the CommentFile class.
public CommentFile ( string contentBaseDirectory ) : System
contentBaseDirectory string The directory to load the content from.
Résultat System

DeleteComment() public méthode

public DeleteComment ( string commentId ) : void
commentId string
Résultat void

GetLastCommentUpdate() public méthode

Returns the last time the allcomments.xml file was writen too in UTC.
public GetLastCommentUpdate ( ) : System.DateTime
Résultat System.DateTime

LoadComments() public méthode

Loads the comment collection from the file system.
public LoadComments ( ) : CommentCollection
Résultat CommentCollection

Rebuild() public méthode

public Rebuild ( ) : void
Résultat void

UpdateComment() public méthode

Updates a comment in the all comments file.
public UpdateComment ( Comment comment ) : void
comment Comment The new version of the comment.
Résultat void