当前位置: 首页>>代码示例>>C#>>正文


C# ISessionImplementor.InternalLoad方法代码示例

本文整理汇总了C#中ISessionImplementor.InternalLoad方法的典型用法代码示例。如果您正苦于以下问题:C# ISessionImplementor.InternalLoad方法的具体用法?C# ISessionImplementor.InternalLoad怎么用?C# ISessionImplementor.InternalLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISessionImplementor的用法示例。


在下文中一共展示了ISessionImplementor.InternalLoad方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ResolveIdentifier

		protected override object ResolveIdentifier( object value, ISessionImplementor session )
		{
			System.Type clazz = AssociatedClass;

			return IsNullable ?
				session.InternalLoadOneToOne( clazz, value ) :
				session.InternalLoad( clazz, value );
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:8,代码来源:OneToOneType.cs

示例2: ResolveIdentifier

		/// <summary>
		/// Resolves the identifier to the actual object.
		/// </summary>
		protected object ResolveIdentifier(object id, ISessionImplementor session)
		{
			string entityName = GetAssociatedEntityName();
			bool isProxyUnwrapEnabled = unwrapProxy && session.Factory
				.GetEntityPersister(entityName)
				.IsInstrumented(session.EntityMode);

			object proxyOrEntity = session.InternalLoad(entityName, id, eager, IsNullable && !isProxyUnwrapEnabled);

			if (proxyOrEntity.IsProxy())
			{
				INHibernateProxy proxy = (INHibernateProxy) proxyOrEntity;
				proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
			}

			return proxyOrEntity;
		}
开发者ID:KaraokeStu,项目名称:nhibernate-core,代码行数:20,代码来源:EntityType.cs

示例3: ResolveAny

		private object ResolveAny(string entityName, object id, ISessionImplementor session)
		{
			return entityName == null || id == null ? null : session.InternalLoad(entityName, id, false, false);
		}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:4,代码来源:AnyType.cs

示例4: Assemble

		public override object Assemble(object cached, ISessionImplementor session, object owner)
		{
			ObjectTypeCacheEntry e = cached as ObjectTypeCacheEntry;
			return (e == null) ? null : session.InternalLoad(e.entityName, e.id, false, false);
		}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:5,代码来源:AnyType.cs

示例5: Replace

		public override object Replace(object original, object current, ISessionImplementor session, object owner,
									   IDictionary copiedAlready)
		{
			if (original == null)
			{
				return null;
			}
			else
			{
				string entityName = session.BestGuessEntityName(original);
				object id = ForeignKeys.GetEntityIdentifierIfNotUnsaved(entityName, original, session);
				return session.InternalLoad(entityName, id, false, false);
			}
		}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:14,代码来源:AnyType.cs

示例6: ResolveIdentifier

		/// <summary>
		/// Resolves the identifier to the actual object.
		/// </summary>
		protected object ResolveIdentifier(object id, ISessionImplementor session)
		{
			bool isProxyUnwrapEnabled = unwrapProxy && session.Factory
				.GetEntityPersister(GetAssociatedEntityName())
				.IsInstrumented(session.EntityMode);

			object proxyOrEntity = session.InternalLoad(GetAssociatedEntityName(), id, eager, IsNullable && !isProxyUnwrapEnabled);

			INHibernateProxy proxy = proxyOrEntity as INHibernateProxy;
			if (proxy!=null)
			{
				proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
			}

			return proxyOrEntity;
		}
开发者ID:paulbatum,项目名称:nhibernate,代码行数:19,代码来源:EntityType.cs

示例7: Assemble

		public object Assemble(object cached, ISessionImplementor session, Object owner)
		{
			if (cached == null)
			{
				return null;
			}

			object[] o = (object[]) cached;
			Multiplicity m = new Multiplicity();
			m.count = (int) o[0];
			m.glarch = o[1] == null ?
			           null :
			           (GlarchProxy) session.InternalLoad(typeof(Glarch).FullName, o[1], false, false);
			return m;
		}
开发者ID:tkellogg,项目名称:NHibernate3-withProxyHooks,代码行数:15,代码来源:MultiplicityType.cs

示例8: Resolve

		private object Resolve( System.Type clazz, object id, ISessionImplementor session )
		{
			return (clazz == null || id == null ) ?
				null :
				session.InternalLoad( clazz, id );
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:6,代码来源:ObjectType.cs

示例9: ResolveIdentifier

		/// <summary>
		/// Resolves the identifier to the actual object.
		/// </summary>
		protected object ResolveIdentifier(object id, ISessionImplementor session)
		{
			return session.InternalLoad(AssociatedClass, id, eager, IsNullable);
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:EntityType.cs

示例10: ResolveIdentifier

		/// <summary>
		/// Resolves the Identifier to the actual object.
		/// </summary>
		/// <param name="id"></param>
		/// <param name="session"></param>
		/// <returns></returns>
		protected override object ResolveIdentifier( object id, ISessionImplementor session )
		{
			return session.InternalLoad( AssociatedClass, id );
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:10,代码来源:ManyToOneType.cs

示例11: Replace

		public override object Replace(object original, object current, ISessionImplementor session, object owner,
		                               IDictionary copiedAlready)
		{
			if (original == null)
			{
				return null;
			}
			else
			{
				System.Type entityClass = NHibernateProxyHelper.GuessClass(original);
				object id = session.GetEntityIdentifierIfNotUnsaved(original);
				return session.InternalLoad(
						entityClass,
						id,
						false,
						false
					);
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:19,代码来源:AnyType.cs

示例12: Assemble

		public override object Assemble(object cached, ISessionImplementor session, object owner)
		{
			ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
			return (cached == null) ? null : session.InternalLoad(e.clazz, e.id, false, false);
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:5,代码来源:AnyType.cs


注:本文中的ISessionImplementor.InternalLoad方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。