C# 클래스 Castle.ActiveRecord.AR

Performs the framework initialization.
This class is not thread safe.
파일 보기 프로젝트 열기: shosca/ActiveRecord 1 사용 예제들

공개 메소드들

메소드 설명
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