C# Класс Shaml.Data.NHibernate.NHibernateSession

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
DefaultFactoryKey string

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

Метод Описание
CloseAllSessions ( ) : void

This method is used by application-specific session storage implementations and unit tests. Its job is to walk thru existing cached sessions and Close() each one.

CurrentFor ( string factoryKey ) : ISession

Used to get the current NHibernate session associated with a factory key; i.e., the key associated with an NHibernate session factory for a specific database. If you're only communicating with one database, you should call Current instead, although you're certainly welcome to call this if you have the factory key available.

GetDefaultSessionFactory ( ) : ISessionFactory

Returns the default ISessionFactory using the DefaultFactoryKey.

GetSessionFactoryFor ( string factoryKey ) : ISessionFactory

Return an ISessionFactory based on the specified factoryKey.

Init ( ISessionStorage storage, string mappingAssemblies ) : NHibernate.Cfg.Configuration
Init ( ISessionStorage storage, string mappingAssemblies, string>.IDictionary cfgProperties ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile, string validatorCfgFile ) : Configuration
InitStorage ( ISessionStorage storage ) : void
IsConfiguredForMultipleDatabases ( ) : bool
RegisterInterceptor ( IInterceptor interceptor ) : void
RemoveSessionFactoryFor ( string factoryKey ) : void
Reset ( ) : void

To facilitate unit testing, this method will reset this object back to its original state before it was configured.

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

Метод Описание
AddConfiguration ( string factoryKey, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string cfgFile, string>.IDictionary cfgProperties, string validatorCfgFile, IPersistenceConfigurer persistenceConfigurer ) : NHibernate.Cfg.Configuration
ConfigureNHibernate ( string cfgFile, string>.IDictionary cfgProperties ) : NHibernate.Cfg.Configuration
ConfigureNHibernateValidator ( NHibernate.Cfg.Configuration cfg, string validatorCfgFile ) : void
CreateSessionFactoryFor ( string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, NHibernate.Cfg.Configuration cfg, IPersistenceConfigurer persistenceConfigurer ) : ISessionFactory
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string>.IDictionary cfgProperties ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string cfgFile ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string cfgFile, string>.IDictionary cfgProperties, string validatorCfgFile ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string cfgFile, string>.IDictionary cfgProperties, string validatorCfgFile, IPersistenceConfigurer persistenceConfigurer ) : Configuration
Init ( ISessionStorage storage, string mappingAssemblies, AutoPersistenceModel autoPersistenceModel, string cfgFile, string validatorCfgFile ) : Configuration
MakeLoadReadyAssemblyName ( string assemblyName ) : string

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

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

This method is used by application-specific session storage implementations and unit tests. Its job is to walk thru existing cached sessions and Close() each one.
public static CloseAllSessions ( ) : void
Результат void

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

Used to get the current NHibernate session associated with a factory key; i.e., the key associated with an NHibernate session factory for a specific database. If you're only communicating with one database, you should call Current instead, although you're certainly welcome to call this if you have the factory key available.
public static CurrentFor ( string factoryKey ) : ISession
factoryKey string
Результат ISession

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

Returns the default ISessionFactory using the DefaultFactoryKey.
public static GetDefaultSessionFactory ( ) : ISessionFactory
Результат ISessionFactory

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

Return an ISessionFactory based on the specified factoryKey.
public static GetSessionFactoryFor ( string factoryKey ) : ISessionFactory
factoryKey string
Результат ISessionFactory

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

public static Init ( ISessionStorage storage, string mappingAssemblies ) : NHibernate.Cfg.Configuration
storage ISessionStorage
mappingAssemblies string
Результат NHibernate.Cfg.Configuration

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

public static Init ( ISessionStorage storage, string mappingAssemblies, string>.IDictionary cfgProperties ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgProperties string>.IDictionary
Результат Configuration

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

public static Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgFile string
Результат Configuration

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

public static Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile, string validatorCfgFile ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgFile string
validatorCfgFile string
Результат Configuration

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

public static InitStorage ( ISessionStorage storage ) : void
storage ISessionStorage
Результат void

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

public static IsConfiguredForMultipleDatabases ( ) : bool
Результат bool

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

public static RegisterInterceptor ( IInterceptor interceptor ) : void
interceptor IInterceptor
Результат void

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

public static RemoveSessionFactoryFor ( string factoryKey ) : void
factoryKey string
Результат void

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

To facilitate unit testing, this method will reset this object back to its original state before it was configured.
public static Reset ( ) : void
Результат void

Описание свойств

DefaultFactoryKey публичное статическое свойство

The default factory key used if only one database is being communicated with.
public static string DefaultFactoryKey
Результат string