C# Class Felinesoft.UmbracoCodeFirst.CodeFirstManager

Manages the UmbracoCodeFirst core, allowing data type registration and content type and instance discovery and creation.
Afficher le fichier Open project: DanMannMann/UmbracoCodeFirst Class Usage Examples

Méthodes publiques

Méthode Description
GenerateTypeFilesFromDatabase ( string folderPath, string nameSpace = "UmbracoCodeFirst.GeneratedTypes" ) : void
Initialise ( Assembly assembly, bool refreshCache = true ) : void

Scans the supplied assembly for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the assembly should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.

Initialise ( IEnumerable assemblies, bool refreshCache = true ) : void

Scans the supplied collection of assemblies for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the collection should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.

Initialise ( IEnumerable types, bool refreshCache = true ) : void

Scans the supplied collection of types for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the collection should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.

Invalidate ( ) : void
Log ( string message, object source, [ sourceMethod = null ) : void
Warn ( string message, object source, [ sourceMethod = null ) : void

Private Methods

Méthode Description
CodeFirstManager ( ) : System

Constructs the singleton instance

CodeFirstManager_Invalidating ( object sender, InvalidatingEventArgs e ) : void
FilterTreeNodes ( Umbraco.Web.Trees.TreeControllerBase sender, Umbraco.Web.Trees.TreeNodesRenderingEventArgs e ) : void
InitialiseModules ( IEnumerable types ) : void

Method Details

GenerateTypeFilesFromDatabase() public méthode

public GenerateTypeFilesFromDatabase ( string folderPath, string nameSpace = "UmbracoCodeFirst.GeneratedTypes" ) : void
folderPath string
nameSpace string
Résultat void

Initialise() public méthode

Scans the supplied assembly for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the assembly should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.
public Initialise ( Assembly assembly, bool refreshCache = true ) : void
assembly System.Reflection.Assembly The assembly to scan
refreshCache bool True to refresh the Umbraco XML cache after creating document instances
Résultat void

Initialise() public méthode

Scans the supplied collection of assemblies for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the collection should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.
public Initialise ( IEnumerable assemblies, bool refreshCache = true ) : void
assemblies IEnumerable The assemblies to scan
refreshCache bool True to refresh the Umbraco XML cache after creating document instances
Résultat void

Initialise() public méthode

Scans the supplied collection of types for code-first document types, media types, data types and document instances. All items are added or updated before control is returned; after running this method all code-first items found in the collection should exist in Umbraco. It is important to include *all* required elements in a single call to initialise; custom data types used within a document type must be available when the document type is created.
public Initialise ( IEnumerable types, bool refreshCache = true ) : void
types IEnumerable The types to scan
refreshCache bool True to refresh the Umbraco XML cache after creating document instances
Résultat void

Invalidate() public static méthode

public static Invalidate ( ) : void
Résultat void

Log() public méthode

public Log ( string message, object source, [ sourceMethod = null ) : void
message string
source object
sourceMethod [
Résultat void

Warn() public méthode

public Warn ( string message, object source, [ sourceMethod = null ) : void
message string
source object
sourceMethod [
Résultat void