C# Класс Roadkill.Core.Services.PageHistoryService

Provides a way of viewing, and comparing the version history of page content, and reverting to previous versions.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CompareVersions ( System.Guid mainVersionId ) : IEnumerable

Compares a page version to the previous version.

GetHistory ( int pageId ) : IEnumerable

Retrieves all history for a page.

MaxVersion ( int pageId ) : int

Retrieves the latest version number for a page.

PageHistoryService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IUserContext context, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory ) : System
RevertTo ( System.Guid versionId, IUserContext context ) : void

Reverts to a particular version, creating a new version in the process.

RevertTo ( int pageId, int versionNumber ) : void

Reverts a page to a particular version, creating a new version in the process.

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

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

Compares a page version to the previous version.
An database error occurred while comparing the two versions.
public CompareVersions ( System.Guid mainVersionId ) : IEnumerable
mainVersionId System.Guid The id of the version to compare
Результат IEnumerable

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

Retrieves all history for a page.
An database error occurred while retrieving the list.
public GetHistory ( int pageId ) : IEnumerable
pageId int The id of the page to get the history for.
Результат IEnumerable

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

Retrieves the latest version number for a page.
public MaxVersion ( int pageId ) : int
pageId int The id of the page to get the version number for.
Результат int

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

public PageHistoryService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IUserContext context, Roadkill.Core.Cache.PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory ) : System
settings Roadkill.Core.Configuration.ApplicationSettings
repository IRepository
context IUserContext
pageViewModelCache Roadkill.Core.Cache.PageViewModelCache
pluginFactory IPluginFactory
Результат System

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

Reverts to a particular version, creating a new version in the process.
An databaseerror occurred while reverting to the version.
public RevertTo ( System.Guid versionId, IUserContext context ) : void
versionId System.Guid The version ID to revert to.
context IUserContext The current logged in user's context.
Результат void

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

Reverts a page to a particular version, creating a new version in the process.
An databaseerror occurred while reverting to the version.
public RevertTo ( int pageId, int versionNumber ) : void
pageId int The id of the page
versionNumber int The version number to revert to.
Результат void