C# Класс Felinesoft.UmbracoCodeFirst.CodeFirstManager

Manages the UmbracoCodeFirst core, allowing data type registration and content type and instance discovery and creation.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

Приватные методы

Метод Описание
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

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

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

public GenerateTypeFilesFromDatabase ( string folderPath, string nameSpace = "UmbracoCodeFirst.GeneratedTypes" ) : void
folderPath string
nameSpace string
Результат void

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

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
Результат void

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

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
Результат void

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

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
Результат void

Invalidate() публичный статический Метод

public static Invalidate ( ) : void
Результат void

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

public Log ( string message, object source, [ sourceMethod = null ) : void
message string
source object
sourceMethod [
Результат void

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

public Warn ( string message, object source, [ sourceMethod = null ) : void
message string
source object
sourceMethod [
Результат void