當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。