當前位置: 首頁>>代碼示例>>C#>>正文


C# XPathExpression.AddSort方法代碼示例

本文整理匯總了C#中System.Xml.XPath.XPathExpression.AddSort方法的典型用法代碼示例。如果您正苦於以下問題:C# XPathExpression.AddSort方法的具體用法?C# XPathExpression.AddSort怎麽用?C# XPathExpression.AddSort使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Xml.XPath.XPathExpression的用法示例。


在下文中一共展示了XPathExpression.AddSort方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PrepareSort

        private static void PrepareSort(XPathExpression expression, XPathNavigator source,
            object sortExpression, IComparer comparer, XmlNamespaceManager context)
        {
            XPathExpression se;

            if (sortExpression is string)
            {
                se = GetCompiledExpression((string)sortExpression, source);
            }
            else if (sortExpression is XPathExpression)
            {
                se = (XPathExpression)sortExpression;
            }
            else
            {
                throw new XPathException(Monobjc.Tools.Sdp.Properties.Resources.XPathCache_BadSortObject, null);
            }

            se.SetContext(context);
            expression.AddSort(se, comparer);
        }
開發者ID:Monobjc,項目名稱:monobjc-tools,代碼行數:21,代碼來源:XPathCache.cs

示例2: PrepareIdNavigator

 /// <summary>
 /// Prepares the Xpath navigator to improve performance for GetNextId().
 /// </summary>
 private void PrepareIdNavigator()
 {
     m_navigator = m_dictionary.CreateNavigator();
     m_expression = m_navigator.Compile(m_basePath);
     m_expression.AddSort(m_XPathId, XmlSortOrder.Descending, XmlCaseOrder.None, String.Empty, XmlDataType.Number);
 }
開發者ID:Stoner19,項目名稱:Memory-Lifter,代碼行數:9,代碼來源:XmlStatistics.cs

示例3: PrepareSort

		private static void PrepareSort(XPathExpression expression, XPathNavigator source, object sortExpression,
			XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType,
			XmlNamespaceManager context)
		{
			XPathExpression se;

			if (sortExpression is string)
			{
				se = GetCompiledExpression((string)sortExpression, source);
			}
			else if (sortExpression is XPathExpression)
			{
				se = (XPathExpression)sortExpression;
			}
			else
			{
				throw new XPathException(Properties.Resources.XPathCache_BadSortObject, null);
			}

			se.SetContext(context);
			expression.AddSort(se, order, caseOrder, lang, dataType);
		}
開發者ID:kisflying,項目名稱:kion,代碼行數:22,代碼來源:XPathCache.cs

示例4: AddToExpr

		public void AddToExpr (XPathExpression e, XslTransformProcessor p)
		{
			e.AddSort (
				expr,
				orderAvt == null ? order : ParseOrder (orderAvt.Evaluate (p)),
				caseOrderAvt == null ? caseOrder: ParseCaseOrder (caseOrderAvt.Evaluate (p)),
				langAvt == null ? lang : ParseLang (langAvt.Evaluate (p)),
				dataTypeAvt == null ? dataType : ParseDataType (dataTypeAvt.Evaluate (p))
			);
		}
開發者ID:GirlD,項目名稱:mono,代碼行數:10,代碼來源:Compiler.cs


注:本文中的System.Xml.XPath.XPathExpression.AddSort方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。