本文整理汇总了C#中Mono.Xml.XPath2.XPathSequence类的典型用法代码示例。如果您正苦于以下问题:C# XPathSequence类的具体用法?C# XPathSequence怎么用?C# XPathSequence使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XPathSequence类属于Mono.Xml.XPath2命名空间,在下文中一共展示了XPathSequence类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetNSResolver
internal IXmlNamespaceResolver GetNSResolver (XPathSequence iter)
{
// FIXME: IXmlNamespaceResolver must be constructed
// considering 1)static context and 2)in-scope element
// construction.
return iter.Context;
}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:XQueryExpression.cs
示例2: EvaluateNode
public XPathSequence EvaluateNode (XPathSequence iter, XPathNodeType moveAfterCreation)
{
XmlDocument doc = new XmlDocument ();
XmlWriter w = iter.Context.Writer;
try {
iter.Context.Writer = doc.CreateNavigator ().AppendChild ();
Serialize (iter);
iter.Context.Writer.Close ();
} finally {
iter.Context.Writer = w;
}
XPathNavigator nav = doc.CreateNavigator ();
switch (moveAfterCreation) {
case XPathNodeType.Attribute:
nav.MoveToFirstAttribute ();
break;
case XPathNodeType.Root:
break;
default:
nav.MoveToFirstChild ();
break;
}
return new SingleItemIterator (nav, iter.Context);
}
开发者ID:Profit0004,项目名称:mono,代码行数:24,代码来源:XQueryExpression.cs
示例3: FnMinImpl
private static object FnMinImpl (XPathSequence e, CultureInfo collation)
{
if (!e.MoveNext ())
return null;
switch (e.Current.XmlType.TypeCode) {
case XmlTypeCode.DayTimeDuration:
return FnMinDayTimeDuration (e);
case XmlTypeCode.YearMonthDuration:
return FnMinYearMonthDuration (e);
case XmlTypeCode.Decimal:
return FnMinDecimal (e);
case XmlTypeCode.Integer:
return FnMinInteger (e);
case XmlTypeCode.Float:
return FnMinFloat (e);
case XmlTypeCode.UntypedAtomic:
case XmlTypeCode.Double:
return FnMinDouble (e);
}
throw new XmlQueryException ("avg() function detected that the sequence contains an item whose type is neither of dayTimeDuration, yearMonthDuration, decimal, integer, float, double, nor untypedAtomic.");
}
开发者ID:Profit0004,项目名称:mono,代码行数:21,代码来源:XQueryFunctionCliImpl.cs
示例4: FnMin
public static object FnMin (XQueryContext ctx, XPathSequence e)
{
return FnMinImpl (e, ctx.DefaultCollation);
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例5: FnMaxFloat
private static float FnMaxFloat (XPathSequence e)
{
float ret = float.MinValue;
do {
ret = System.Math.Max (e.Current.ValueAsSingle, ret);
} while (e.MoveNext ());
return ret;
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:XQueryFunctionCliImpl.cs
示例6: FnMaxDecimal
private static decimal FnMaxDecimal (XPathSequence e)
{
decimal ret = decimal.MinValue;
do {
ret = System.Math.Max (e.Current.ValueAsDecimal, ret);
} while (e.MoveNext ());
return ret;
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:XQueryFunctionCliImpl.cs
示例7: FnAvgYearMonthDuration
private static TimeSpan FnAvgYearMonthDuration (XPathSequence e)
{
throw new NotImplementedException ();
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例8: FnDeepEqualImpl
public static bool FnDeepEqualImpl (XPathSequence p1, XPathSequence p2, CultureInfo collation)
{
// FIXME: use collation
while (p1.MoveNext ()) {
if (!p2.MoveNext ())
return false;
if (!FnDeepEqualItem (p1.Current, p2.Current, collation))
return false;
}
if (p2.MoveNext ())
return false;
return true;
}
开发者ID:Profit0004,项目名称:mono,代码行数:13,代码来源:XQueryFunctionCliImpl.cs
示例9: FnRemove
public static XPathSequence FnRemove (XPathSequence target, int position)
{
if (position < 1)
return target;
return new RemovalIterator (target, position);
}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:XQueryFunctionCliImpl.cs
示例10: FnInsertBefore
public static XPathSequence FnInsertBefore (XPathSequence target, int position, XPathSequence inserts)
{
if (position < 1)
position = 1;
return new InsertingIterator (target, position, inserts);
}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:XQueryFunctionCliImpl.cs
示例11: FnDistinctValuesImpl
private static XPathSequence FnDistinctValuesImpl (XQueryContext ctx, XPathSequence items, CultureInfo collation)
{
return new DistinctValueIterator (ctx, items, collation);
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例12: FnDistinctValues
public static XPathSequence FnDistinctValues (XQueryContext ctx, XPathSequence items, string collation)
{
return FnDistinctValuesImpl (ctx, items, ctx.GetCulture (collation));
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例13: FnExists
public static bool FnExists (XPathSequence e)
{
if (e is XPathEmptySequence)
return false;
return e.MoveNext ();
}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:XQueryFunctionCliImpl.cs
示例14: FnDeepEqual
public static object FnDeepEqual (XQueryContext ctx, XPathSequence p1, XPathSequence p2)
{
return FnDeepEqualImpl (p1, p2, ctx.DefaultCollation);
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例15: FnReverse
public static XPathSequence FnReverse (XPathSequence arg)
{
ArrayList al = new ArrayList ();
while (arg.MoveNext ())
al.Add (arg.Current);
al.Reverse ();
return new ListIterator (arg.Context, al);
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:XQueryFunctionCliImpl.cs
示例16: FnCount
public static int FnCount (XPathSequence e)
{
if (e == null)
return 0;
return e.Count;
}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:XQueryFunctionCliImpl.cs
示例17: FnSubsequence
public static object FnSubsequence (XPathSequence sourceSeq, double startingLoc)
{
return FnSubsequence (sourceSeq, startingLoc, double.MaxValue);
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例18: FnAvgDouble
private static TimeSpan FnAvgDouble (XPathSequence e)
{
throw new NotImplementedException ();
}
开发者ID:Profit0004,项目名称:mono,代码行数:4,代码来源:XQueryFunctionCliImpl.cs
示例19: FnMaxInteger
private static int FnMaxInteger (XPathSequence e)
{
int ret = int.MinValue;
do {
ret = System.Math.Max (e.Current.ValueAsInt32, ret);
} while (e.MoveNext ());
return ret;
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:XQueryFunctionCliImpl.cs
示例20: FnUnordered
// Basically it should be optimized by XQueryASTCompiler
public static XPathSequence FnUnordered (XPathSequence e)
{
return e;
}
开发者ID:Profit0004,项目名称:mono,代码行数:5,代码来源:XQueryFunctionCliImpl.cs
注:本文中的Mono.Xml.XPath2.XPathSequence类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论