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


C# PersistentClass.AddTuplizer方法代码示例

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


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

示例1: BindPocoRepresentation

		private void BindPocoRepresentation(IEntityMapping classMapping, PersistentClass entity)
		{
			string className = classMapping.Name == null
			                   	? null
													: ClassForNameChecked(classMapping.Name, mappings, "persistent class {0} not found").
			                   	  	AssemblyQualifiedName;

			entity.ClassName = className;

			if (!string.IsNullOrEmpty(classMapping.Proxy))
			{
				entity.ProxyInterfaceName = ClassForNameChecked(classMapping.Proxy, mappings, "proxy class not found: {0}").AssemblyQualifiedName;
				entity.IsLazy = true;
			}
			else if (entity.IsLazy)
				entity.ProxyInterfaceName = className;

			HbmTuplizer tuplizer = classMapping.Tuplizers.FirstOrDefault(tp=> tp.entitymode == HbmTuplizerEntitymode.Poco);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName([email protected], mappings);
				entity.AddTuplizer(EntityMode.Poco, tupClassName);
			}
		}
开发者ID:khaliyo,项目名称:Spring.net-NHibernate.net-Asp.net-MVC-DWZ-,代码行数:24,代码来源:ClassBinder.cs

示例2: BindXmlRepresentation

		private void BindXmlRepresentation(IEntityMapping classMapping, PersistentClass entity)
		{
			entity.NodeName = string.IsNullOrEmpty(classMapping.Node) ? StringHelper.Unqualify(entity.EntityName): classMapping.Node;

			HbmTuplizer tuplizer = classMapping.Tuplizers.FirstOrDefault(tp => tp.entitymode == HbmTuplizerEntitymode.Xml);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName([email protected], mappings);
				entity.AddTuplizer(EntityMode.Xml, tupClassName);
			}
		}
开发者ID:khaliyo,项目名称:Spring.net-NHibernate.net-Asp.net-MVC-DWZ-,代码行数:11,代码来源:ClassBinder.cs

示例3: BindMapRepresentation

		private void BindMapRepresentation(IEntityMapping classMapping, PersistentClass entity)
		{
			HbmTuplizer tuplizer = classMapping.Tuplizers.FirstOrDefault(tp => tp.entitymode == HbmTuplizerEntitymode.DynamicMap);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName([email protected], mappings);
				entity.AddTuplizer(EntityMode.Map, tupClassName);
			}
		}
开发者ID:khaliyo,项目名称:Spring.net-NHibernate.net-Asp.net-MVC-DWZ-,代码行数:9,代码来源:ClassBinder.cs

示例4: BindPocoRepresentation

		private void BindPocoRepresentation(XmlNode node, PersistentClass entity)
		{
			string className = node.Attributes["name"] == null
			                   	? null
			                   	: ClassForNameChecked(node.Attributes["name"].Value, mappings, "persistent class {0} not found").
			                   	  	AssemblyQualifiedName;

			entity.ClassName = className;

			XmlAttribute proxyNode = node.Attributes["proxy"];
			if (proxyNode != null)
			{
				entity.ProxyInterfaceName = ClassForNameChecked(proxyNode.Value, mappings, "proxy class not found: {0}").AssemblyQualifiedName;
				entity.IsLazy = true;
			}
			else if (entity.IsLazy)
				entity.ProxyInterfaceName = className;

			XmlNode tuplizer = LocateTuplizerDefinition(node, EntityMode.Poco);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName(tuplizer.Attributes["class"].Value, mappings);
				entity.AddTuplizer(EntityMode.Poco, tupClassName);
			}
		}
开发者ID:nkmajeti,项目名称:nhibernate,代码行数:25,代码来源:ClassBinder.cs

示例5: BindXmlRepresentation

		private void BindXmlRepresentation(XmlNode node, PersistentClass entity)
		{
			string nodeName = null;
			XmlAttribute nodeAtt = node.Attributes["node"];
			if(nodeAtt != null)
				nodeName = nodeAtt.Value;
			if (nodeName == null)
				nodeName = StringHelper.Unqualify(entity.EntityName);
			entity.NodeName = nodeName;

			XmlNode tuplizer = LocateTuplizerDefinition(node, EntityMode.Xml);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName(tuplizer.Attributes["class"].Value, mappings);
				entity.AddTuplizer(EntityMode.Xml, tupClassName);
			}
		}
开发者ID:nkmajeti,项目名称:nhibernate,代码行数:17,代码来源:ClassBinder.cs

示例6: BindMapRepresentation

		private void BindMapRepresentation(XmlNode node, PersistentClass entity)
		{
			XmlNode tuplizer = LocateTuplizerDefinition(node, EntityMode.Map);
			if (tuplizer != null)
			{
				string tupClassName = FullQualifiedClassName(tuplizer.Attributes["class"].Value, mappings);
				entity.AddTuplizer(EntityMode.Map, tupClassName);
			}
		}
开发者ID:nkmajeti,项目名称:nhibernate,代码行数:9,代码来源:ClassBinder.cs


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