當前位置: 首頁>>代碼示例>>C#>>正文


C# ProcessingContext.ClearContext方法代碼示例

本文整理匯總了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;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:70,代碼來源:BranchOpcode.cs


注:本文中的System.ServiceModel.Dispatcher.ProcessingContext.ClearContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。