本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}