本文整理汇总了C#中MS.Internal.Xml.XPath.Query类的典型用法代码示例。如果您正苦于以下问题:C# Query类的具体用法?C# Query怎么用?C# Query使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于MS.Internal.Xml.XPath命名空间,在下文中一共展示了Query类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BaseAxisQuery
protected BaseAxisQuery(Query qyInput)
{
_name = string.Empty;
_prefix = string.Empty;
_nsUri = string.Empty;
this.qyInput = qyInput;
}
示例2: UnionExpr
public UnionExpr(Query query1, Query query2)
{
this.qy1 = query1;
this.qy2 = query2;
_advance1 = true;
_advance2 = true;
}
示例3: AssertQuery
public static void AssertQuery(Query query)
{
if (!(query is FunctionQuery))
{
XPathNavigator navigator2;
query = Clone(query);
XPathNavigator l = null;
int count = query.Clone().Count;
for (int i = 0; (navigator2 = query.Advance()) != null; i++)
{
if (navigator2.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator")
{
return;
}
if (navigator2.GetType().ToString() == "System.Xml.DataDocumentXPathNavigator")
{
return;
}
if ((l != null) && ((l.NodeType != XPathNodeType.Namespace) || (navigator2.NodeType != XPathNodeType.Namespace)))
{
CompareNodes(l, navigator2);
}
l = navigator2.Clone();
}
}
}
示例4: AddSort
public override void AddSort(object expr, IComparer comparer)
{
// sort makes sense only when we are dealing with a query that
// returns a nodeset.
Query evalExpr;
string query = expr as string;
if (query != null)
{
evalExpr = new QueryBuilder().Build(query, out _needContext); // this will throw if expr is invalid
}
else
{
CompiledXpathExpr xpathExpr = expr as CompiledXpathExpr;
if (xpathExpr != null)
{
evalExpr = xpathExpr.QueryTree;
}
else
{
throw XPathException.Create(SR.Xp_BadQueryObject);
}
}
SortQuery sortQuery = _query as SortQuery;
if (sortQuery == null)
{
_query = sortQuery = new SortQuery(_query);
}
sortQuery.AddSort(evalExpr, comparer);
}
示例5: SortQuery
private SortQuery(SortQuery other) : base(other)
{
this.results = new List<SortKey>(other.results);
this.comparer = other.comparer.Clone();
this.qyInput = Query.Clone(other.qyInput);
base.count = 0;
}
示例6: Clone
// ----------------- Helper methods -------------
public static Query Clone(Query input)
{
if (input != null)
{
return (Query)input.Clone();
}
return null;
}
示例7: CanBeNumber
private bool CanBeNumber(Query q)
{
if (q.StaticType != XPathResultType.Any)
{
return (q.StaticType == XPathResultType.Number);
}
return true;
}
示例8: BaseAxisQuery
protected BaseAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
{
this.qyInput = qyInput;
this.name = name;
this.prefix = prefix;
this.typeTest = typeTest;
this.nameTest = (prefix.Length != 0) || (name.Length != 0);
this.nsUri = string.Empty;
}
示例9: StringFunctions
private StringFunctions(StringFunctions other) : base(other) {
this.funcType = other.funcType;
Query[] tmp = new Query[other.argList.Count]; {
for (int i = 0; i < tmp.Length; i ++) {
tmp[i] = Clone(other.argList[i]);
}
}
this.argList = tmp;
}
示例10: BaseAxisQuery
protected BaseAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) {
Debug.Assert(qyInput != null);
this.qyInput = qyInput;
this.name = name;
this.prefix = prefix;
this.typeTest = typeTest;
this.nameTest = prefix.Length != 0 || name.Length != 0;
this.nsUri = string.Empty;
}
示例11: StringFunctions
private StringFunctions(StringFunctions other) : base(other)
{
this.funcType = other.funcType;
Query[] queryArray = new Query[other.argList.Count];
for (int i = 0; i < queryArray.Length; i++)
{
queryArray[i] = Query.Clone(other.argList[i]);
}
this.argList = queryArray;
}
示例12: FunctionQuery
private FunctionQuery(FunctionQuery other) : base(other) {
this.function = other.function;
Query[] tmp = new Query[other.args.Count]; {
for (int i = 0; i < tmp.Length; i ++) {
tmp[i] = Clone(other.args[i]);
}
args = tmp;
}
this.args = tmp;
}
示例13: LogicalExpr
public LogicalExpr(Operator.Op op, Query opnd1, Query opnd2) {
Debug.Assert(
Operator.Op.LT == op || Operator.Op.GT == op ||
Operator.Op.LE == op || Operator.Op.GE == op ||
Operator.Op.EQ == op || Operator.Op.NE == op
);
this.op = op;
this.opnd1 = opnd1;
this.opnd2 = opnd2;
}
示例14: FunctionQuery
private FunctionQuery(FunctionQuery other) : base(other)
{
this.function = other.function;
Query[] queryArray = new Query[other.args.Count];
for (int i = 0; i < queryArray.Length; i++)
{
queryArray[i] = Query.Clone(other.args[i]);
}
this.args = queryArray;
this.args = queryArray;
}
示例15: BooleanExpr
public BooleanExpr(Operator.Op op, Query opnd1, Query opnd2) {
Debug.Assert(op == Operator.Op.AND || op == Operator.Op.OR);
Debug.Assert(opnd1 != null && opnd2 != null);
if (opnd1.StaticType != XPathResultType.Boolean) {
opnd1 = new BooleanFunctions(Function.FunctionType.FuncBoolean, opnd1);
}
if (opnd2.StaticType != XPathResultType.Boolean) {
opnd2 = new BooleanFunctions(Function.FunctionType.FuncBoolean, opnd2);
}
this.opnd1 = opnd1;
this.opnd2 = opnd2;
isOr = (op == Operator.Op.OR);
}