当前位置: 首页>>代码示例>>C#>>正文


C# Dispatcher.ProcessingContext类代码示例

本文整理汇总了C#中System.ServiceModel.Dispatcher.ProcessingContext的典型用法代码示例。如果您正苦于以下问题:C# ProcessingContext类的具体用法?C# ProcessingContext怎么用?C# ProcessingContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ProcessingContext类属于System.ServiceModel.Dispatcher命名空间,在下文中一共展示了ProcessingContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     if (!context.LoadVariable(this.expr.Variable))
     {
         context.PushSequenceFrame();
         NodeSequence seq = context.CreateSequence();
         seq.Add(context.Processor.ContextNode);
         context.PushSequence(seq);
         int counterMarker = context.Processor.CounterMarker;
         try
         {
             this.expr.Eval(context);
         }
         catch (XPathNavigatorException exception)
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception.Process(this));
         }
         catch (NavigatorInvalidBodyAccessException exception2)
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception2.Process(this));
         }
         context.Processor.CounterMarker = counterMarker;
         context.PopSequenceFrame();
         context.PopSequenceFrame();
         context.LoadVariable(this.expr.Variable);
     }
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:SubExprOpcode.cs

示例2: BooleanLang

 internal static void BooleanLang(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     StackFrame topSequenceArg = context.TopSequenceArg;
     Value[] sequences = context.Sequences;
     while (topSequenceArg.basePtr <= topSequenceArg.endPtr)
     {
         NodeSequence sequence = sequences[topSequenceArg.basePtr++].Sequence;
         for (int i = 0; i < sequence.Count; i++)
         {
             string strA = context.PeekString(topArg.basePtr).ToUpperInvariant();
             QueryNode node = sequence.Items[i].Node;
             long currentPosition = node.Node.CurrentPosition;
             node.Node.CurrentPosition = node.Position;
             string strB = node.Node.XmlLang.ToUpperInvariant();
             node.Node.CurrentPosition = currentPosition;
             if ((strA.Length == strB.Length) && (string.CompareOrdinal(strA, strB) == 0))
             {
                 context.SetValue(context, topArg.basePtr++, true);
             }
             else if (((strB.Length > 0) && (strA.Length < strB.Length)) && (strB.StartsWith(strA, StringComparison.Ordinal) && (strB[strA.Length] == '-')))
             {
                 context.SetValue(context, topArg.basePtr++, true);
             }
             else
             {
                 context.SetValue(context, topArg.basePtr++, false);
             }
         }
         topSequenceArg.basePtr++;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:XPathFunction.cs

示例3: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         string messageId = context.Processor.MessageId;
         if (messageId == null)
         {
             Message contextMessage = context.Processor.ContextMessage;
             if (contextMessage == null)
             {
                 SeekableXPathNavigator contextNode = context.Processor.ContextNode;
                 long currentPosition = contextNode.CurrentPosition;
                 messageId = ExtractFromNavigator(contextNode);
                 contextNode.CurrentPosition = currentPosition;
             }
             else
             {
                 UniqueId id = contextMessage.Headers.MessageId;
                 if (id == null)
                 {
                     messageId = string.Empty;
                 }
                 else
                 {
                     messageId = id.ToString();
                 }
             }
             context.Processor.MessageId = messageId;
         }
         context.Push(messageId, iterationCount);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:XPathMessageFunctionMessageID.cs

示例4: SafeNodeSequenceIterator

 public SafeNodeSequenceIterator(NodeSequence seq, ProcessingContext context) : base(seq)
 {
     this.context = context;
     this.seq = seq;
     Interlocked.Increment(ref this.seq.refCount);
     this.context.Processor.AddRef();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SafeNodeSequenceIterator.cs

示例5: Eval

 internal override void Eval(ProcessingContext context)
 {
     StackFrame[] frameArray = new StackFrame[this.argCount];
     for (int i = 0; i < this.argCount; i++)
     {
         frameArray[i] = context[i];
     }
     StringBuilder builder = new StringBuilder();
     while (frameArray[0].basePtr <= frameArray[0].endPtr)
     {
         builder.Length = 0;
         for (int k = 0; k < this.argCount; k++)
         {
             builder.Append(context.PeekString(frameArray[k].basePtr));
         }
         context.SetValue(context, frameArray[this.argCount - 1].basePtr, builder.ToString());
         for (int m = 0; m < this.argCount; m++)
         {
             frameArray[m].basePtr++;
         }
     }
     for (int j = 0; j < (this.argCount - 1); j++)
     {
         context.PopFrame();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:ConcatFunction.cs

示例6: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     StackFrame topArg = context.TopArg;
     SeekableXPathNavigator contextNode = context.Processor.ContextNode;
     long currentPosition = contextNode.CurrentPosition;
     while (topArg.basePtr <= topArg.endPtr)
     {
         string str = context.PeekString(topArg.basePtr);
         NodeSequence val = context.CreateSequence();
         if (XPathMessageFunction.MoveToHeader(contextNode) && contextNode.MoveToFirstChild())
         {
             do
             {
                 long num2 = contextNode.CurrentPosition;
                 string str2 = XPathMessageFunctionActor.ExtractFromNavigator(contextNode);
                 contextNode.CurrentPosition = num2;
                 if (str2 == str)
                 {
                     val.Add(contextNode);
                 }
             }
             while (contextNode.MoveToNext());
         }
         context.SetValue(context, topArg.basePtr, val);
         topArg.basePtr++;
     }
     contextNode.CurrentPosition = currentPosition;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:XPathMessageFunctionHeadersWithActor.cs

示例7: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topSequenceArg = context.TopSequenceArg;
     Value[] sequences = context.Sequences;
     bool sequenceStackInUse = context.SequenceStackInUse;
     context.PushSequenceFrame();
     for (int i = topSequenceArg.basePtr; i <= topSequenceArg.endPtr; i++)
     {
         NodeSequence sequence = sequences[i].Sequence;
         if (sequence.Count == 0)
         {
             if (!sequenceStackInUse)
             {
                 context.PushSequence(NodeSequence.Empty);
             }
         }
         else
         {
             NodeSequenceItem[] items = sequence.Items;
             for (int j = 0; j < sequence.Count; j++)
             {
                 SeekableXPathNavigator contextNode = items[j].GetNavigator();
                 NodeSequence destSequence = context.CreateSequence();
                 destSequence.StartNodeset();
                 base.criteria.Select(contextNode, destSequence);
                 destSequence.StopNodeset();
                 context.PushSequence(destSequence);
             }
         }
     }
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:InitialSelectOpcode.cs

示例8: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     bool flag = false;
     if (1 == topArg.Count)
     {
         flag = context.Values[topArg.basePtr].ToBoolean();
     }
     else
     {
         context.Processor.Result = false;
         for (int i = topArg.basePtr; i <= topArg.endPtr; i++)
         {
             if (context.Values[i].ToBoolean())
             {
                 flag = true;
                 break;
             }
         }
     }
     if (flag)
     {
         ICollection<MessageFilter> matchSet = context.Processor.MatchSet;
         int num2 = 0;
         int count = this.results.Count;
         while (num2 < count)
         {
             matchSet.Add((MessageFilter) this.results[num2]);
             num2++;
         }
     }
     context.PopFrame();
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:MatchMultipleResultOpcode.cs

示例9: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            XPathResult result;
            StackFrame topArg = context.TopArg;
            switch (context.Values[topArg.basePtr].Type)
            {
                case ValueDataType.Boolean:
                    result = new XPathResult(context.Values[topArg.basePtr].GetBoolean());
                    break;

                case ValueDataType.Double:
                    result = new XPathResult(context.Values[topArg.basePtr].GetDouble());
                    break;

                case ValueDataType.Sequence:
                {
                    SafeNodeSequenceIterator nodeSetResult = new SafeNodeSequenceIterator(context.Values[topArg.basePtr].GetSequence(), context);
                    result = new XPathResult(nodeSetResult);
                    break;
                }
                case ValueDataType.String:
                    result = new XPathResult(context.Values[topArg.basePtr].GetString());
                    break;

                default:
                    throw Fx.AssertAndThrow("Unexpected result type.");
            }
            context.Processor.QueryResult = result;
            context.PopFrame();
            return base.next;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:31,代码来源:QueryResultOpcode.cs

示例10: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         string toHeader = context.Processor.ToHeader;
         if (toHeader == null)
         {
             Message contextMessage = context.Processor.ContextMessage;
             if (contextMessage == null)
             {
                 SeekableXPathNavigator contextNode = context.Processor.ContextNode;
                 long currentPosition = contextNode.CurrentPosition;
                 toHeader = ExtractFromNavigator(contextNode);
                 contextNode.CurrentPosition = currentPosition;
             }
             else
             {
                 Uri to = contextMessage.Headers.To;
                 if (to == null)
                 {
                     toHeader = contextMessage.Version.Addressing.Anonymous;
                 }
                 else
                 {
                     toHeader = to.AbsoluteUri;
                 }
             }
             context.Processor.ToHeader = toHeader;
         }
         context.Push(toHeader, iterationCount);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:XPathMessageFunctionTo.cs

示例11: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     int iterationCount = context.IterationCount;
     context.PushSequenceFrame();
     if (iterationCount > 0)
     {
         NodeSequence seq = context.CreateSequence();
         seq.StartNodeset();
         SeekableXPathNavigator contextNode = context.Processor.ContextNode;
         long currentPosition = contextNode.CurrentPosition;
         if (XPathMessageFunction.MoveToAddressingHeader(contextNode, "RelatesTo"))
         {
             seq.Add(contextNode);
             while (XPathMessageFunction.MoveToAddressingHeaderSibling(contextNode, "RelatesTo"))
             {
                 seq.Add(contextNode);
             }
         }
         seq.StopNodeset();
         context.PushSequence(seq);
         for (int i = 1; i < iterationCount; i++)
         {
             seq.refCount++;
             context.PushSequence(seq);
         }
         contextNode.CurrentPosition = currentPosition;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:XPathMessageFunctionRelatesTo.cs

示例12: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         string soapUri = context.Processor.SoapUri;
         if (soapUri == null)
         {
             Message contextMessage = context.Processor.ContextMessage;
             if (contextMessage == null)
             {
                 SeekableXPathNavigator contextNode = context.Processor.ContextNode;
                 long currentPosition = contextNode.CurrentPosition;
                 soapUri = ExtractFromNavigator(contextNode);
                 contextNode.CurrentPosition = currentPosition;
             }
             else
             {
                 soapUri = contextMessage.Version.Envelope.Namespace;
             }
             context.Processor.SoapUri = soapUri;
         }
         context.Push(soapUri, iterationCount);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:XPathMessageFunctionSoapUri.cs

示例13: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            XPathResult result;
            StackFrame topArg = context.TopArg;
            switch (context.Values[topArg.basePtr].Type)
            {
                case ValueDataType.Boolean:
                    result = new XPathResult(context.Values[topArg.basePtr].GetBoolean());
                    break;

                case ValueDataType.Double:
                    result = new XPathResult(context.Values[topArg.basePtr].GetDouble());
                    break;

                case ValueDataType.Sequence:
                {
                    SafeNodeSequenceIterator nodeSetResult = new SafeNodeSequenceIterator(context.Values[topArg.basePtr].GetSequence(), context);
                    result = new XPathResult(nodeSetResult);
                    break;
                }
                case ValueDataType.String:
                    result = new XPathResult(context.Values[topArg.basePtr].GetString());
                    break;

                default:
                    throw Fx.AssertAndThrow("Unexpected result type.");
            }
            context.Processor.ResultSet.Add(new KeyValuePair<MessageQuery, XPathResult>((MessageQuery) this.results[0], result));
            for (int i = 1; i < this.results.Count; i++)
            {
                context.Processor.ResultSet.Add(new KeyValuePair<MessageQuery, XPathResult>((MessageQuery) this.results[i], result.Copy()));
            }
            context.PopFrame();
            return base.next;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:QueryMultipleResultOpcode.cs

示例14: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     if (!context.LoadVariable(base.expr.Variable))
     {
         base.expr.Eval(context);
     }
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:InternalSubExprOpcode.cs

示例15: BooleanNot

 internal static void BooleanNot(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     Value[] values = context.Values;
     while (topArg.basePtr <= topArg.endPtr)
     {
         values[topArg.basePtr++].Not();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:XPathFunction.cs


注:本文中的System.ServiceModel.Dispatcher.ProcessingContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。