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.
显示文件 Open project: AArnott/dasblog Class Usage Examples

Public Methods

Method 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

Method Description
SaveComments ( CommentCollection comments ) : void

Method Details

AddComment() public method

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

CommentFile() public method

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

DeleteComment() public method

public DeleteComment ( string commentId ) : void
commentId string
return void

GetLastCommentUpdate() public method

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

LoadComments() public method

Loads the comment collection from the file system.
public LoadComments ( ) : CommentCollection
return CommentCollection

Rebuild() public method

public Rebuild ( ) : void
return void

UpdateComment() public method

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