本文整理汇总了C#中Notation.Flag方法的典型用法代码示例。如果您正苦于以下问题:C# Notation.Flag方法的具体用法?C# Notation.Flag怎么用?C# Notation.Flag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notation
的用法示例。
在下文中一共展示了Notation.Flag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessFLORExpr
private object ProcessFLORExpr(Notation notation, Notation.Record rec)
{
int stack_pos = _varTable.BeginFrame();
Symbol[] arr = Lisp.ToArray<Symbol>(rec.args[0]);
List<FLWORItem> flworItems = new List<FLWORItem>();
bool stable = false;
for (int k = 0; k < arr.Length; k++)
{
Notation.Record[] recs = notation.Select(arr[k]);
switch (recs[0].descriptor)
{
case Descriptor.For:
{
Symbol[] arr2 = Lisp.ToArray<Symbol>(recs[0].args[0]);
for (int s = 0; s < arr2.Length; s++)
{
Notation.Record[] recs2 = notation.Select(arr2[s],
Descriptor.ForClauseOperator, 4);
if (recs.Length > 0)
{
FLWORItem item = new FLWORItem();
item.desc = Descriptor.For;
if (notation.Flag(arr[k], Descriptor.Parallel))
item.parallel = true;
VarName name = (VarName)recs2[0].Arg0;
item.var = ProcessVarName(name);
item.assignExpr = ProcessExprSingle(notation, recs2[0].Arg3);
item.convert = true;
if (recs2[0].Arg1 == null)
{
XQuerySequenceType type = EvalExprType(item.assignExpr);
if (type.TypeCode != XmlTypeCode.Item)
{
item.varType = new XQuerySequenceType(type.TypeCode, XmlTypeCardinality.One);
item.convert = false;
}
else
item.varType = XQuerySequenceType.Item;
}
else
item.varType = ProcessTypeDecl(notation, recs2[0].Arg1);
item.pos = null;
if (recs2[0].Arg2 != null)
{
VarName posname = (VarName)recs2[0].Arg2;
if (posname.Name == name.Name)
throw new XQueryException(Properties.Resources.XQST0089, posname.Name);
item.pos = ProcessVarName(posname);
}
_varTable.PushVar(item.var, item.varType);
if (item.pos != null)
_varTable.PushVar(item.pos, new XQuerySequenceType(XmlTypeCode.Integer));
flworItems.Add(item);
}
}
}
break;
case Descriptor.Let:
{
Symbol[] arr2 = Lisp.ToArray<Symbol>(recs[0].args[0]);
for (int s = 0; s < arr2.Length; s++)
{
Notation.Record[] recs2 = notation.Select(arr2[s],
Descriptor.LetClauseOperator, 3);
if (recs.Length > 0)
{
FLWORItem item = new FLWORItem();
item.desc = Descriptor.Let;
item.var = ProcessVarName((VarName)recs2[0].Arg0);
item.assignExpr = ProcessExprSingle(notation, recs2[0].Arg2);
item.convert = true;
if (recs2[0].Arg1 == null)
{
XQuerySequenceType type = EvalExprType(item.assignExpr);
if (type.Cardinality == XmlTypeCardinality.One)
{
item.varType = type;
item.convert = false;
}
else
item.varType = XQuerySequenceType.Item;
}
else
item.varType = ProcessTypeDecl(notation, recs2[0].Arg1);
_varTable.PushVar(item.var, item.varType);
flworItems.Add(item);
}
}
}
break;
}
}
XQueryOrderSpec[] orderSpec = null;
XQueryExprBase expr = XQueryExpr.Create(_context,
new object[] { ProcessExprSingle(notation, rec.Arg3) });
if (rec.Arg2 != null)
{
Notation.Record[] recs = notation.Select(rec.Arg2, new Descriptor[] {
Descriptor.OrderBy, Descriptor.StableOrderBy });
//.........这里部分代码省略.........