C# Class N2.Edit.Versioning.ContentVersionRepository

显示文件 Open project: n2cms/n2cms Class Usage Examples

Public Methods

Method Description
ContentVersionRepository ( IRepository repository, N2.Persistence.Serialization.Exporter exporter, N2.Persistence.Serialization.Importer importer, IUrlParser parser, IProxyFactory proxyFactory ) : System
Delete ( ContentItem item ) : void
DeleteVersionsOf ( ContentItem item ) : void
Deserialize ( string xml ) : ContentItem
DeserializeVersion ( N2.Edit.Versioning.ContentVersion version ) : ContentItem
GetGreatestVersionIndex ( ContentItem item ) : int
GetLatestVersion ( ContentItem item ) : ContentItem
GetVersion ( ContentItem item, int versionIndex = -1 ) : N2.Edit.Versioning.ContentVersion
GetVersions ( ContentItem item ) : IEnumerable
GetVersionsScheduledForPublish ( System.DateTime publishVersionsScheduledBefore ) : IEnumerable
Save ( ContentItem item, bool asPreviousVersion = true ) : N2.Edit.Versioning.ContentVersion
Serialize ( ContentItem item ) : string
SerializeVersion ( N2.Edit.Versioning.ContentVersion version, ContentItem item ) : void

Private Methods

Method Description
ApplyCommonValuesRecursive ( ContentItem parent ) : void
GetMaster ( ContentItem item ) : ContentItem

Method Details

ContentVersionRepository() public method

public ContentVersionRepository ( IRepository repository, N2.Persistence.Serialization.Exporter exporter, N2.Persistence.Serialization.Importer importer, IUrlParser parser, IProxyFactory proxyFactory ) : System
repository IRepository
exporter N2.Persistence.Serialization.Exporter
importer N2.Persistence.Serialization.Importer
parser IUrlParser
proxyFactory IProxyFactory
return System

Delete() public method

public Delete ( ContentItem item ) : void
item ContentItem
return void

DeleteVersionsOf() public method

public DeleteVersionsOf ( ContentItem item ) : void
item ContentItem
return void

Deserialize() public method

public Deserialize ( string xml ) : ContentItem
xml string
return ContentItem

DeserializeVersion() public method

public DeserializeVersion ( N2.Edit.Versioning.ContentVersion version ) : ContentItem
version N2.Edit.Versioning.ContentVersion
return ContentItem

GetGreatestVersionIndex() public method

public GetGreatestVersionIndex ( ContentItem item ) : int
item ContentItem
return int

GetLatestVersion() public method

public GetLatestVersion ( ContentItem item ) : ContentItem
item ContentItem
return ContentItem

GetVersion() public method

public GetVersion ( ContentItem item, int versionIndex = -1 ) : N2.Edit.Versioning.ContentVersion
item ContentItem
versionIndex int
return N2.Edit.Versioning.ContentVersion

GetVersions() public method

public GetVersions ( ContentItem item ) : IEnumerable
item ContentItem
return IEnumerable

GetVersionsScheduledForPublish() public method

public GetVersionsScheduledForPublish ( System.DateTime publishVersionsScheduledBefore ) : IEnumerable
publishVersionsScheduledBefore System.DateTime
return IEnumerable

Save() public method

public Save ( ContentItem item, bool asPreviousVersion = true ) : N2.Edit.Versioning.ContentVersion
item ContentItem
asPreviousVersion bool
return N2.Edit.Versioning.ContentVersion

Serialize() public method

public Serialize ( ContentItem item ) : string
item ContentItem
return string

SerializeVersion() public method

public SerializeVersion ( N2.Edit.Versioning.ContentVersion version, ContentItem item ) : void
version N2.Edit.Versioning.ContentVersion
item ContentItem
return void