本文整理匯總了C#中System.ServiceModel.Dispatcher.ProcessingContext.ClearContext方法的典型用法代碼示例。如果您正苦於以下問題:C# ProcessingContext.ClearContext方法的具體用法?C# ProcessingContext.ClearContext怎麽用?C# ProcessingContext.ClearContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.ServiceModel.Dispatcher.ProcessingContext
的用法示例。
在下文中一共展示了ProcessingContext.ClearContext方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Eval
internal override Opcode Eval(ProcessingContext context)
{
QueryProcessor processor = context.Processor;
SeekableXPathNavigator contextNode = processor.ContextNode;
int counterMarker = processor.CounterMarker;
long currentPosition = contextNode.CurrentPosition;
int num3 = 0;
int count = this.branches.Count;
try
{
Opcode opcode;
if (context.StacksInUse)
{
if (--count > 0)
{
BranchContext context2 = new BranchContext(context);
while (num3 < count)
{
opcode = this.branches[num3];
if ((opcode.Flags & OpcodeFlags.Fx) != OpcodeFlags.None)
{
opcode.Eval(context);
}
else
{
ProcessingContext context3 = context2.Create();
while (opcode != null)
{
opcode = opcode.Eval(context3);
}
}
contextNode.CurrentPosition = currentPosition;
processor.CounterMarker = counterMarker;
num3++;
}
context2.Release();
}
opcode = this.branches[num3];
while (opcode != null)
{
opcode = opcode.Eval(context);
}
}
else
{
int nodeCount = context.NodeCount;
while (num3 < count)
{
for (opcode = this.branches[num3]; opcode != null; opcode = opcode.Eval(context))
{
}
context.ClearContext();
context.NodeCount = nodeCount;
contextNode.CurrentPosition = currentPosition;
processor.CounterMarker = counterMarker;
num3++;
}
}
}
catch (XPathNavigatorException exception)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception.Process(this.branches[num3]));
}
catch (NavigatorInvalidBodyAccessException exception2)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception2.Process(this.branches[num3]));
}
processor.CounterMarker = counterMarker;
return base.next;
}