C# Class Phun.Data.FileContentRepository

Inheritance: AContentRepository, IContentRepository
Mostrar archivo Open project: noogen/phuncms Class Usage Examples

Public Methods

Method Description
Exists ( ContentModel content ) : bool

Check for exist of content.

FileContentRepository ( IMapRouteConfiguration config ) : System

Initializes a new instance of the FileContentRepository class.

FileContentRepository ( string basePath ) : System

Initializes a new instance of the FileContentRepository class.

List ( ContentModel content ) : IQueryable

Lists the specified content.Path

Remove ( ContentModel content ) : void

Removes the specified content path or route.

Retrieve ( ContentModel content, bool includeData = true ) : ContentModel

Populate or gets the content provided specific host, path, and name property.

Save ( ContentModel content ) : void

Saves the specified content.

Private Methods

Method Description
Empty ( string path ) : void

Empties the specified path.

Initialize ( string path ) : void

Initializes the specified base path.

ResolvePath ( ContentModel content ) : string

Resolves the path.

Method Details

Exists() public method

Check for exist of content.
public Exists ( ContentModel content ) : bool
content ContentModel The content - requires host, path, and name property.
return bool

FileContentRepository() public method

Initializes a new instance of the FileContentRepository class.
/// basePath is required.;basePath /// or /// Please check PhunCms content repository configuration. Path does not exists: + basePath;basePath ///
public FileContentRepository ( IMapRouteConfiguration config ) : System
config IMapRouteConfiguration The config.
return System

FileContentRepository() public method

Initializes a new instance of the FileContentRepository class.
basePath is required.;basePath
public FileContentRepository ( string basePath ) : System
basePath string The base path.
return System

List() public method

Lists the specified content.Path
public List ( ContentModel content ) : IQueryable
content ContentModel The content.
return IQueryable

Remove() public method

Removes the specified content path or route.
public Remove ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property. If name is set to "*" then removes all for host and path.
return void

Retrieve() public method

Populate or gets the content provided specific host, path, and name property.
public Retrieve ( ContentModel content, bool includeData = true ) : ContentModel
content ContentModel The content - requires host, path, and name property.
includeData bool if set to true [include data].
return ContentModel

Save() public method

Saves the specified content.
public Save ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property.
return void