C# Класс Castle.ActiveRecord.AR

Performs the framework initialization.
This class is not thread safe.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Configure ( ) : DefaultActiveRecordConfiguration

Builds a fluent configuration for general ActiveRecord settings.

CreateSchema ( ) : void

Generates and executes the creation scripts for the database.

CreateSchema ( Type baseClass ) : void

Generates and executes the creation scripts for the database using the specified baseClass to know which database it should create the schema for.

CurrentScope ( ) : ISessionScope

Gets the current scope

DisposeCurrentScope ( ) : void

Disposes the current scope

DropSchema ( ) : void

Generates and executes the Drop scripts for the database.

DropSchema ( Type baseClass ) : void

Generates and executes the Drop scripts for the database using the specified baseClass to know which database it should create the scripts for.

GenerateCreationScripts ( String fileName ) : void

Generates the creation scripts for the database

If ActiveRecord was configured to access more than one database, a file is going to be generate for each, based on the path and the fileName specified.

GenerateCreationScripts ( Type baseType, String fileName ) : void

Generates the creation scripts for the database The baseType is used to identify which database should we act upon.

GenerateDropScripts ( String fileName ) : void

Generates the drop scripts for the database saving them to the supplied file name.

If ActiveRecord was configured to access more than one database, a file is going to be generate for each, based on the path and the fileName specified.

GenerateDropScripts ( Type baseType, String fileName ) : void

Generates the drop scripts for the database saving them to the supplied file name. The baseType is used to identify which database should we act upon.

Initialize ( ) : void

Initializes the framework reading the configuration from the AppDomain and checking all the types on the executing Assembly

Initialize ( this source ) : void

Initialize the mappings using the configuration and checking all the types on the specified Assemblies

ResetInitialization ( ) : void

Intended to be used only by test cases

UpdateSchema ( ) : IList

Generates and executes the creation scripts for the database.

UpdateSchema ( Type baseClass ) : IList

Generates and executes the creation scripts for the database using the specified baseClass to know which database it should create the schema for.

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

Метод Описание
CheckInitialized ( ) : void
CreateAnotherFile ( string originalFileName, int fileCount ) : string

Generate a file name based on the original file name specified, using the count to give it some order.

CreateSchemaExport ( NHibernate.Cfg.Configuration cfg ) : NHibernate.Tool.hbm2ddl.SchemaExport
CreateSchemaUpdate ( NHibernate.Cfg.Configuration cfg ) : NHibernate.Tool.hbm2ddl.SchemaUpdate
CreateSessionFactoryAndRegisterToHolder ( IActiveRecordConfiguration source ) : void

Initialize the mappings using the configuration and the list of types

CreateSessionFactoryHolderImplementation ( IActiveRecordConfiguration source ) : ISessionFactoryHolder
RaiseOnConfigurationCreated ( NHibernate.Cfg.Configuration cfg, SessionFactoryConfig sessionFactoryConfig ) : void
RaiseOnHbmMappingCreated ( NHibernate.Cfg.MappingSchema.HbmMapping mapping, SessionFactoryConfig sessionFactoryConfig ) : void
RaiseOnMapperCreated ( NHibernate.Mapping.ByCode.ConventionModelMapper mapper, SessionFactoryConfig sessionFactoryConfig ) : void
RaiseSessionFactoryCreated ( ISessionFactory sf, NHibernate cfg, string name ) : void
RaiseSessionFactoryHolderCreated ( ISessionFactoryHolder holder ) : void

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

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

Builds a fluent configuration for general ActiveRecord settings.
public static Configure ( ) : DefaultActiveRecordConfiguration
Результат DefaultActiveRecordConfiguration

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

Generates and executes the creation scripts for the database.
public static CreateSchema ( ) : void
Результат void

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

Generates and executes the creation scripts for the database using the specified baseClass to know which database it should create the schema for.
public static CreateSchema ( Type baseClass ) : void
baseClass System.Type
Результат void

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

Gets the current scope
public static CurrentScope ( ) : ISessionScope
Результат ISessionScope

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

Disposes the current scope
public static DisposeCurrentScope ( ) : void
Результат void

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

Generates and executes the Drop scripts for the database.
public static DropSchema ( ) : void
Результат void

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

Generates and executes the Drop scripts for the database using the specified baseClass to know which database it should create the scripts for.
public static DropSchema ( Type baseClass ) : void
baseClass System.Type
Результат void

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

Generates the creation scripts for the database
If ActiveRecord was configured to access more than one database, a file is going to be generate for each, based on the path and the fileName specified.
public static GenerateCreationScripts ( String fileName ) : void
fileName String
Результат void

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

Generates the creation scripts for the database The baseType is used to identify which database should we act upon.
public static GenerateCreationScripts ( Type baseType, String fileName ) : void
baseType System.Type
fileName String
Результат void

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

Generates the drop scripts for the database saving them to the supplied file name.
If ActiveRecord was configured to access more than one database, a file is going to be generate for each, based on the path and the fileName specified.
public static GenerateDropScripts ( String fileName ) : void
fileName String
Результат void

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

Generates the drop scripts for the database saving them to the supplied file name. The baseType is used to identify which database should we act upon.
public static GenerateDropScripts ( Type baseType, String fileName ) : void
baseType System.Type
fileName String
Результат void

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

Initializes the framework reading the configuration from the AppDomain and checking all the types on the executing Assembly
public static Initialize ( ) : void
Результат void

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

Initialize the mappings using the configuration and checking all the types on the specified Assemblies
public static Initialize ( this source ) : void
source this
Результат void

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

Intended to be used only by test cases
public static ResetInitialization ( ) : void
Результат void

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

Generates and executes the creation scripts for the database.
public static UpdateSchema ( ) : IList
Результат IList

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

Generates and executes the creation scripts for the database using the specified baseClass to know which database it should create the schema for.
public static UpdateSchema ( Type baseClass ) : IList
baseClass Type
Результат IList