本文整理汇总了C#中MS.Internal.Xml.XPath.Query类的典型用法代码示例。如果您正苦于以下问题:C# Query类的具体用法?C# Query怎么用?C# Query使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于MS.Internal.Xml.XPath命名空间,在下文中一共展示了Query类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BaseAxisQuery
protected BaseAxisQuery(Query qyInput)
{
_name = string.Empty;
_prefix = string.Empty;
_nsUri = string.Empty;
this.qyInput = qyInput;
}
开发者ID:noahfalk,项目名称:corefx,代码行数:7,代码来源:BaseAxisQuery.cs
示例2: UnionExpr
public UnionExpr(Query query1, Query query2)
{
this.qy1 = query1;
this.qy2 = query2;
_advance1 = true;
_advance2 = true;
}
开发者ID:Rayislandstyle,项目名称:corefx,代码行数:7,代码来源:UnionExpr.cs
示例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();
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:Query.cs
示例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);
}
开发者ID:Corillian,项目名称:corefx,代码行数:29,代码来源:CompiledXPathExpr.cs
示例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;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SortQuery.cs
示例6: Clone
// ----------------- Helper methods -------------
public static Query Clone(Query input)
{
if (input != null)
{
return (Query)input.Clone();
}
return null;
}
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:Query.cs
示例7: CanBeNumber
private bool CanBeNumber(Query q)
{
if (q.StaticType != XPathResultType.Any)
{
return (q.StaticType == XPathResultType.Number);
}
return true;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:QueryBuilder.cs
示例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;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:BaseAxisQuery.cs
示例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;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:StringFunctions.cs
示例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;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:BaseAxisQuery.cs
示例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;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:StringFunctions.cs
示例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;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:10,代码来源:FunctionQuery.cs
示例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;
}
开发者ID:uQr,项目名称:referencesource,代码行数:10,代码来源:LogicalExpr.cs
示例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;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:FunctionQuery.cs
示例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);
}
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:13,代码来源:booleanexpr.cs
示例16: NumericExpr
public NumericExpr(Operator.Op op, Query opnd1, Query opnd2)
{
if (opnd1.StaticType != XPathResultType.Number)
{
opnd1 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd1);
}
if (opnd2.StaticType != XPathResultType.Number)
{
opnd2 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd2);
}
this.op = op;
this.opnd1 = opnd1;
this.opnd2 = opnd2;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:NumericExpr.cs
示例17: NumericExpr
public NumericExpr(Operator.Op op, Query opnd1, Query opnd2) {
Debug.Assert(
op == Operator.Op.PLUS || op == Operator.Op.MINUS ||
op == Operator.Op.MUL || op == Operator.Op.DIV ||
op == Operator.Op.MOD
);
Debug.Assert(opnd1 != null && opnd2 != null);
if (opnd1.StaticType != XPathResultType.Number) {
opnd1 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd1);
}
if (opnd2.StaticType != XPathResultType.Number) {
opnd2 = new NumberFunctions(Function.FunctionType.FuncNumber, opnd2);
}
this.op = op;
this.opnd1 = opnd1;
this.opnd2 = opnd2;
}
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:17,代码来源:numericexpr.cs
示例18: 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;
if (expr is string) {
evalExpr = new QueryBuilder().Build((string)expr, out needContext); // this will throw if expr is invalid
} else if (expr is CompiledXpathExpr) {
evalExpr = ((CompiledXpathExpr)expr).QueryTree;
} else {
throw XPathException.Create(Res.Xp_BadQueryObject);
}
SortQuery sortQuery = query as SortQuery;
if (sortQuery == null) {
query = sortQuery = new SortQuery(query);
}
sortQuery.AddSort(evalExpr, comparer);
}
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:17,代码来源:compiledxpathexpr.cs
示例19: AddSort
public override void AddSort(object expr, IComparer comparer)
{
Query queryTree;
if (expr is string)
{
queryTree = new QueryBuilder().Build((string) expr, out this.needContext);
}
else
{
if (!(expr is CompiledXpathExpr))
{
throw XPathException.Create("Xp_BadQueryObject");
}
queryTree = ((CompiledXpathExpr) expr).QueryTree;
}
SortQuery query2 = this.query as SortQuery;
if (query2 == null)
{
this.query = query2 = new SortQuery(this.query);
}
query2.AddSort(queryTree, comparer);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:CompiledXpathExpr.cs
示例20: FollowingQuery
public FollowingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) {}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:1,代码来源:followingquery.cs
注:本文中的MS.Internal.Xml.XPath.Query类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论