using System; using System.Configuration; using System.Configuration.Provider; using System.Collections.Generic; namespace Yavsc.Model.Blogs { /// /// Blog provider. /// public abstract class BlogProvider: ProviderBase { /// /// Gets the post. /// /// The post. /// Postid. public abstract BlogEntry GetPost (long postid); /// /// Gets the post. /// /// The post. /// Username. /// Title. public abstract BlogEntry GetPost (string username, string title); /// /// Gets the post identifier. /// /// The post identifier. /// Username. /// Title. public abstract long GetPostId (string username, string title); /// /// Post the specified username, title, content and visible. /// /// Username. /// Title. /// Content. /// If set to true visible. public abstract long Post (string username, string title, string content, bool visible); /// /// Updates the post. /// /// Postid. /// Title. /// Content. /// If set to true visible. public abstract void UpdatePost (long postid, string title, string content, bool visible); /// /// Finds the post. /// /// The post. /// Pattern. /// Searchflags. /// Page index. /// Page size. /// Total records. public abstract BlogEntryCollection FindPost (string pattern, FindBlogEntryFlags searchflags, int pageIndex, int pageSize, out int totalRecords); /// /// Removes the post. /// /// Username. /// Title. public abstract void RemovePost (string username, string title); /// /// Removes the post. /// /// Postid. public abstract void RemovePost (long postid); /// /// Removes the comment. /// /// The comment. /// Cmtid. public abstract long RemoveComment (long cmtid); /// /// Lasts the posts. /// /// The posts. /// Page index. /// Page size. /// Total records. public abstract BlogEntryCollection LastPosts(int pageIndex, int pageSize, out int totalRecords); /// /// Blogs the title. /// /// The title. /// Username. public abstract string BlogTitle (string username); /// /// Comment the specified from, postid and content. /// /// From. /// Postid. /// Content. public abstract long Comment (string from, long postid, string content); /// /// Gets the comments. /// /// The comments. /// Postid. /// If set to true get hidden. public abstract Comment[] GetComments (long postid, bool getHidden) ; /// /// Gets or sets a value indicating whether this auto validate comment. /// /// true if auto validate comment; otherwise, false. public abstract bool AutoValidateComment { get; set; } /// /// Validates the comment. /// /// Cmtid. public abstract void ValidateComment (long cmtid); /// /// Updates the comment. /// /// Cmtid. /// Content. /// If set to true visible. public abstract void UpdateComment (long cmtid, string content, bool visible); /// /// Tag the specified postid and tag. /// /// Postid. /// Tag. public abstract long Tag (long postid,string tag); /// /// Removes the tag. /// /// Tagid. public abstract void RemoveTag (long tagid); } }