using System;
using ScrewTurn.Wiki.PluginFramework;
namespace ScrewTurn.Wiki {
///
/// Contains extended information about a Page.
///
public class ExtendedPageInfo {
private PageInfo pageInfo;
private string title, creator, lastAuthor;
private DateTime modificationDateTime;
private int messageCount;
///
/// Initializes a new instance of the class.
///
/// The object.
/// The title of the page.
/// The modification date/time.
/// The creator.
/// The last author.
public ExtendedPageInfo(PageInfo pageInfo, string title, DateTime modificationDateTime, string creator, string lastAuthor) {
this.pageInfo = pageInfo;
this.title = FormattingPipeline.PrepareTitle(title, false, FormattingContext.PageContent, pageInfo);
this.modificationDateTime = modificationDateTime;
this.creator = creator;
this.lastAuthor = lastAuthor;
this.messageCount = Pages.GetMessageCount(pageInfo);
}
///
/// Gets the PageInfo object.
///
public PageInfo PageInfo {
get { return pageInfo; }
}
///
/// Gets the title of the page.
///
public string Title {
get { return title; }
}
///
/// Gets the creation date/time.
///
public DateTime CreationDateTime {
get { return pageInfo.CreationDateTime; }
}
///
/// Gets the modification date/time.
///
public DateTime ModificationDateTime {
get { return modificationDateTime; }
}
///
/// Gets the creator.
///
public string Creator {
get { return creator; }
}
///
/// Gets the last author.
///
public string LastAuthor {
get { return lastAuthor; }
}
///
/// Gets the number of messages.
///
public int MessageCount {
get { return messageCount; }
}
}
}