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

This method is invoked when the Castle.ActiveRecord.Framework.ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. RegisterSession
public IsKeyKnown ( object key ) : bool
key object an object instance
Результат bool
Пример #1
0
		public override bool IsKeyKnown(object key)
		{
			if (mode == TransactionMode.Inherits && parentTransactionScope != null)
			{
				return parentTransactionScope.IsKeyKnown(key);
			}
			
			bool keyKnown = false;

			if (parentSimpleScope != null)
			{
				keyKnown = parentSimpleScope.IsKeyKnown(key);
			}

			return keyKnown ? true : base.IsKeyKnown(key);
		}