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


C# IElementDef.GetSQPPath方法代码示例

本文整理汇总了C#中IElementDef.GetSQPPath方法的典型用法代码示例。如果您正苦于以下问题:C# IElementDef.GetSQPPath方法的具体用法?C# IElementDef.GetSQPPath怎么用?C# IElementDef.GetSQPPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IElementDef的用法示例。


在下文中一共展示了IElementDef.GetSQPPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ElementRef

 /// <summary>
 /// Creates an ElementRef instance using the specified IElementDef as the reference path
 /// </summary>
 /// <param name="root"></param>
 /// <param name="referencedField"></param>
 /// <param name="version"></param>
 public ElementRef(IElementDef root, IElementDef referencedField, SifVersion version)
 {
     fField = referencedField;
     fXPath = referencedField.GetSQPPath(version);
 }
开发者ID:rafidzal,项目名称:OpenADK-csharp,代码行数:11,代码来源:ElementRef.cs

示例2: AddCondition

        /// <summary>
        /// Add a condition to this query.
        /// </summary>
        /// <remarks>
        /// This method of adding conditions is convenient for adding conditions involving 
        /// root attributes or elements to a query. If you need to add conditions on deeply
        /// nested elements, use <see cref="AddCondition(string,ComparisonOperators,string)"/>
        /// </remarks>
        /// <param name="field">A constant from the package DTD class that identifies an element
        /// or attribute of the data object (e.g. <c>StudentDTD.STUDENTPERSONAL_REFID</c>)</param>
        /// <param name="ops">The comparison operator. Comparison operator constants are
        /// defined by the ComparisionOperators enum</param>
        /// <param name="value">The data that is used to compare to the element or attribute</param>
        /// <exception cref="ArgumentException">if the ElementDef does not represent an immediate
        /// child of the object being queried.</exception>
        public void AddCondition(IElementDef field, ComparisonOperators ops, String value)
        {
            // Do some validation to try to prevent invalid query paths from being created
            String relativePath = field.GetSQPPath(Adk.SifVersion);
            IElementDef lookedUp = Adk.Dtd.LookupElementDefBySQP(fObjType, relativePath);
            if (lookedUp == null)
            {
                throw new ArgumentException("Invalid path: " + fObjType.Name + "/" + relativePath +
                             " is unable to be resolved");
            }

            AddCondition(new Condition(fObjType, relativePath, ops, value));
        }
开发者ID:rafidzal,项目名称:OpenADK-csharp,代码行数:28,代码来源:Query.cs


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