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

This method is invoked when no session was available at and the Castle.ActiveRecord.Framework.ISessionFactoryHolder just created one. So it registers the session created within this scope using a key. The scope implementation shouldn't make any assumption on what the key actually is as we reserve the right to change it IsKeyKnown
public RegisterSession ( object key, ISession session ) : void
key object an object instance
session ISession An instance of ISession
Результат void
Пример #1
0
		public override void RegisterSession(object key, ISession session)
		{
			if (mode == TransactionMode.Inherits && parentTransactionScope != null)
			{
				parentTransactionScope.RegisterSession(key, session);
			}
			else if (parentSimpleScope != null)
			{
				parentSimpleScope.RegisterSession(key, session);
			}

			base.RegisterSession(key, session);
		}