本文整理匯總了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);
}
}