C# Class Shaml.Data.NHibernate.NHibernateSession

Afficher le fichier Open project: sztupy/shaml

Méthodes publiques

Свойство Type Description
DefaultFactoryKey string

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

CloseAllSessions() public static méthode

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
Résultat void

CurrentFor() public static méthode

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
Résultat ISession

GetDefaultSessionFactory() public static méthode

Returns the default ISessionFactory using the DefaultFactoryKey.
public static GetDefaultSessionFactory ( ) : ISessionFactory
Résultat ISessionFactory

GetSessionFactoryFor() public static méthode

Return an ISessionFactory based on the specified factoryKey.
public static GetSessionFactoryFor ( string factoryKey ) : ISessionFactory
factoryKey string
Résultat ISessionFactory

Init() public static méthode

public static Init ( ISessionStorage storage, string mappingAssemblies ) : NHibernate.Cfg.Configuration
storage ISessionStorage
mappingAssemblies string
Résultat NHibernate.Cfg.Configuration

Init() public static méthode

public static Init ( ISessionStorage storage, string mappingAssemblies, string>.IDictionary cfgProperties ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgProperties string>.IDictionary
Résultat Configuration

Init() public static méthode

public static Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgFile string
Résultat Configuration

Init() public static méthode

public static Init ( ISessionStorage storage, string mappingAssemblies, string cfgFile, string validatorCfgFile ) : Configuration
storage ISessionStorage
mappingAssemblies string
cfgFile string
validatorCfgFile string
Résultat Configuration

InitStorage() public static méthode

public static InitStorage ( ISessionStorage storage ) : void
storage ISessionStorage
Résultat void

IsConfiguredForMultipleDatabases() public static méthode

public static IsConfiguredForMultipleDatabases ( ) : bool
Résultat bool

RegisterInterceptor() public static méthode

public static RegisterInterceptor ( IInterceptor interceptor ) : void
interceptor IInterceptor
Résultat void

RemoveSessionFactoryFor() public static méthode

public static RemoveSessionFactoryFor ( string factoryKey ) : void
factoryKey string
Résultat void

Reset() public static méthode

To facilitate unit testing, this method will reset this object back to its original state before it was configured.
public static Reset ( ) : void
Résultat void

Property Details

DefaultFactoryKey public_oe static_oe property

The default factory key used if only one database is being communicated with.
public static string DefaultFactoryKey
Résultat string