public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode
			 mode)
		{
			if (IsTAAware(classMetadata))
			{
				return new NonDescendingActivationDepth(mode);
			}
			if (mode.IsPrefetch())
			{
				return new FixedActivationDepth(1, mode);
			}
			return new DescendingActivationDepth(this, mode);
		}
Beispiel #2
0
 public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode
                                                    mode)
 {
     if (IsTAAware(classMetadata))
     {
         return(new NonDescendingActivationDepth(mode));
     }
     if (mode.IsPrefetch())
     {
         return(new FixedActivationDepth(1, mode));
     }
     return(new DescendingActivationDepth(this, mode));
 }
		public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode
			 mode)
		{
			if (mode.IsPrefetch())
			{
				return new LegacyActivationDepth(1, mode);
			}
			int globalLegacyActivationDepth = ConfigImpl(classMetadata).ActivationDepth();
			Config4Class config = classMetadata.ConfigOrAncestorConfig();
			int defaultDepth = null == config ? globalLegacyActivationDepth : config.AdjustActivationDepth
				(globalLegacyActivationDepth);
			return new LegacyActivationDepth(defaultDepth, mode);
		}
        public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode
                                                           mode)
        {
            if (mode.IsPrefetch())
            {
                return(new LegacyActivationDepth(1, mode));
            }
            int          globalLegacyActivationDepth = ConfigImpl(classMetadata).ActivationDepth();
            Config4Class config       = classMetadata.ConfigOrAncestorConfig();
            int          defaultDepth = null == config ? globalLegacyActivationDepth : config.AdjustActivationDepth
                                            (globalLegacyActivationDepth);

            return(new LegacyActivationDepth(defaultDepth, mode));
        }