本文整理汇总了C#中System.Xml.XmlElement.WithAtt方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.WithAtt方法的具体用法?C# XmlElement.WithAtt怎么用?C# XmlElement.WithAtt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.WithAtt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteBaseCollectionAttributes
protected void WriteBaseCollectionAttributes(XmlElement element, ICollectionMapping mapping)
{
if (mapping.HasValue(x => x.Access))
element.WithAtt("access", mapping.Access);
if (mapping.HasValue(x => x.BatchSize))
element.WithAtt("batch-size", mapping.BatchSize);
if (mapping.HasValue(x => x.Cascade))
element.WithAtt("cascade", mapping.Cascade);
if (mapping.HasValue(x => x.Check))
element.WithAtt("check", mapping.Check);
if (mapping.HasValue(x => x.CollectionType))
element.WithAtt("collection-type", mapping.CollectionType);
if (mapping.HasValue(x => x.Fetch))
element.WithAtt("fetch", mapping.Fetch);
if (mapping.HasValue(x => x.Generic))
element.WithAtt("generic", mapping.Generic);
if (mapping.HasValue(x => x.Inverse))
element.WithAtt("inverse", mapping.Inverse);
if (mapping.HasValue(x => x.Lazy))
element.WithAtt("lazy", mapping.Lazy);
if (mapping.HasValue(x => x.Name))
element.WithAtt("name", mapping.Name);
if (mapping.HasValue(x => x.OptimisticLock))
element.WithAtt("optimistic-lock", mapping.OptimisticLock);
if (mapping.HasValue(x => x.Persister))
element.WithAtt("persister", mapping.Persister);
if (mapping.HasValue(x => x.Schema))
element.WithAtt("schema", mapping.Schema);
if (mapping.HasValue(x => x.TableName))
element.WithAtt("table", mapping.TableName);
if (mapping.HasValue(x => x.Where))
element.WithAtt("where", mapping.Where);
if (mapping.HasValue(x => x.Subselect))
element.WithAtt("subselect", mapping.Subselect);
if (mapping.HasValue(x => x.Mutable))
element.WithAtt("mutable", mapping.Mutable);
}
示例2: WriteBaseCollectionAttributes
protected void WriteBaseCollectionAttributes(XmlElement element, CollectionMapping mapping)
{
if (mapping.IsSpecified("Access"))
element.WithAtt("access", mapping.Access);
if (mapping.IsSpecified("BatchSize"))
element.WithAtt("batch-size", mapping.BatchSize);
if (mapping.IsSpecified("Cascade"))
element.WithAtt("cascade", mapping.Cascade);
if (mapping.IsSpecified("Check"))
element.WithAtt("check", mapping.Check);
if (mapping.IsSpecified("CollectionType") && mapping.CollectionType != TypeReference.Empty)
element.WithAtt("collection-type", mapping.CollectionType);
if (mapping.IsSpecified("Fetch"))
element.WithAtt("fetch", mapping.Fetch);
if (mapping.IsSpecified("Generic"))
element.WithAtt("generic", mapping.Generic);
if (mapping.IsSpecified("Inverse"))
element.WithAtt("inverse", mapping.Inverse);
if (mapping.IsSpecified("Lazy"))
element.WithAtt("lazy", mapping.Lazy.ToString().ToLowerInvariant());
if (mapping.IsSpecified("Name"))
element.WithAtt("name", mapping.Name);
if (mapping.IsSpecified("OptimisticLock"))
element.WithAtt("optimistic-lock", mapping.OptimisticLock);
if (mapping.IsSpecified("Persister"))
element.WithAtt("persister", mapping.Persister);
if (mapping.IsSpecified("Schema"))
element.WithAtt("schema", mapping.Schema);
if (mapping.IsSpecified("TableName"))
element.WithAtt("table", mapping.TableName);
if (mapping.IsSpecified("Where"))
element.WithAtt("where", mapping.Where);
if (mapping.IsSpecified("Subselect"))
element.WithAtt("subselect", mapping.Subselect);
if (mapping.IsSpecified("Mutable"))
element.WithAtt("mutable", mapping.Mutable);
}