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


C# XmlElement.WithAtt方法代码示例

本文整理汇总了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);
        }
开发者ID:roend83,项目名称:fluent-nhibernate,代码行数:53,代码来源:CollectionAttributeWriter.cs

示例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);
        }
开发者ID:akhuang,项目名称:NHibernateTest,代码行数:53,代码来源:CollectionAttributeWriter.cs


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