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


C# ProcessingContext.Push方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: BooleanFalse

 internal static void BooleanFalse(ProcessingContext context)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         context.Push(false, iterationCount);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:XPathFunction.cs

示例5: InvokeInternal

 internal override void InvokeInternal(ProcessingContext context, int argCount)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         context.Push(XPathMessageFunction.ConvertDate(DateTime.Now), iterationCount);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:XPathMessageFunctionDateNow.cs

示例6: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     context.PushFrame();
     int iterationCount = context.IterationCount;
     if (iterationCount > 0)
     {
         context.Push(this.literal, iterationCount);
     }
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:PushBooleanOpcode.cs

示例7: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topSequenceArg = context.TopSequenceArg;
     Value[] sequences = context.Sequences;
     context.PushFrame();
     for (int i = topSequenceArg.basePtr; i <= topSequenceArg.endPtr; i++)
     {
         NodeSequence sequence = sequences[i].Sequence;
         for (int j = 0; j < sequence.Count; j++)
         {
             NodeSequenceItem item = sequence[j];
             context.Push(item.Position == this.ordinal);
         }
     }
     return base.next;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:LiteralOrdinalOpcode.cs

示例8: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            StackFrame sequences = context.TopSequenceArg;
            Value[] sequenceBuffer = context.Sequences;

            context.PushFrame();
            for (int i = sequences.basePtr; i <= sequences.endPtr; ++i)
            {
                NodeSequence sequence = sequenceBuffer[i].Sequence;
                for (int item = 0; item < sequence.Count; ++item)
                {
                    context.Push(sequence[item].Position == this.ordinal);
                }
            }
            return this.next;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:16,代码来源:QuerySetOp.cs

示例9: InvokeInternal

        internal override void InvokeInternal(ProcessingContext context, int argCount)
        {
            context.PushFrame();
            int count = context.IterationCount;
            if (count > 0)
            {
                string soap = context.Processor.SoapUri;
                if (soap == null)
                {
                    Message msg = context.Processor.ContextMessage;
                    if (msg == null)
                    {
                        SeekableXPathNavigator nav = context.Processor.ContextNode;

                        long p = nav.CurrentPosition;
                        soap = ExtractFromNavigator(nav);
                        nav.CurrentPosition = p;
                    }
                    else
                    {
                        soap = msg.Version.Envelope.Namespace;
                    }

                    context.Processor.SoapUri = soap;
                }
                context.Push(soap, count);
            }
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:28,代码来源:XPathMessageContext.cs

示例10: IterateAndPushSequences

 internal static void IterateAndPushSequences(ProcessingContext context)
 {
     StackFrame topSequenceArg = context.TopSequenceArg;
     Value[] sequences = context.Sequences;
     context.PushFrame();
     while (topSequenceArg.basePtr <= topSequenceArg.endPtr)
     {
         NodeSequence sequence = sequences[topSequenceArg.basePtr++].Sequence;
         if (sequence.Count == 0)
         {
             context.PushSequence(NodeSequence.Empty);
         }
         else
         {
             for (int i = 0; i < sequence.Count; i++)
             {
                 NodeSequence sequence2 = context.CreateSequence();
                 sequence2.StartNodeset();
                 sequence2.Add(ref sequence.Items[i]);
                 sequence2.StopNodeset();
                 context.Push(sequence2);
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:XPathFunction.cs

示例11: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            XPathNavigator nav = context.Processor.ContextNode;
            if (nav != null && context.Processor.ContextMessage != null)
            {
                ((SeekableMessageNavigator)nav).Atomize();
            }

            if (this.argCount == 0)
            {
                context.PushFrame();
                int count = context.IterationCount;
                if (count > 0)
                {
                    object ret = this.function.Invoke(this.xsltContext, NullArgs, nav);
                    switch (this.function.ReturnType)
                    {
                        case XPathResultType.String:
                            context.Push((string)ret, count);
                            break;

                        case XPathResultType.Number:
                            context.Push((double)ret, count);
                            break;

                        case XPathResultType.Boolean:
                            context.Push((bool)ret, count);
                            break;

                        case XPathResultType.NodeSet:
                            NodeSequence seq = context.CreateSequence();
                            XPathNodeIterator iter = (XPathNodeIterator)ret;
                            seq.Add(iter);
                            context.Push(seq, count);
                            break;

                        default:
                            // This should never be reached
                            throw DiagnosticUtility.ExceptionUtility.ThrowHelperCritical(new QueryProcessingException(QueryProcessingError.Unexpected, SR.GetString(SR.QueryFunctionTypeNotSupported, this.function.ReturnType.ToString())));
                    }
                }
            }
            else
            {
                // PERF, [....], see if we can cache these arrays to avoid allocations
                object[] xsltArgs = new object[this.argCount];
                int iterationCount = context.TopArg.Count;
                for (int iteration = 0; iteration < iterationCount; ++iteration)
                {
                    for (int i = 0; i < this.argCount; ++i)
                    {
                        StackFrame arg = context[i];
                        Fx.Assert(iteration < arg.Count, "");

                        switch (this.function.ArgTypes[i])
                        {
                            case XPathResultType.String:
                                xsltArgs[i] = context.PeekString(arg[iteration]);
                                break;

                            case XPathResultType.Number:
                                xsltArgs[i] = context.PeekDouble(arg[iteration]);
                                break;

                            case XPathResultType.Boolean:
                                xsltArgs[i] = context.PeekBoolean(arg[iteration]);
                                break;

                            case XPathResultType.NodeSet:
                                NodeSequenceIterator iter = new NodeSequenceIterator(context.PeekSequence(arg[iteration]));
                                xsltArgs[i] = iter;
                                this.iterList.Add(iter);
                                break;

                            default:
                                // This should never be reached
                                throw DiagnosticUtility.ExceptionUtility.ThrowHelperCritical(new QueryProcessingException(QueryProcessingError.Unexpected, SR.GetString(SR.QueryFunctionTypeNotSupported, this.function.ArgTypes[i].ToString())));
                        }
                    }

                    object ret = this.function.Invoke(this.xsltContext, xsltArgs, nav);

                    if (this.iterList != null)
                    {
                        for (int i = 0; i < this.iterList.Count; ++i)
                        {
                            this.iterList[i].Clear();
                        }
                        this.iterList.Clear();
                    }

                    switch (this.function.ReturnType)
                    {
                        case XPathResultType.String:
                            context.SetValue(context, context[this.argCount - 1][iteration], (string)ret);
                            break;

                        case XPathResultType.Number:
                            context.SetValue(context, context[this.argCount - 1][iteration], (double)ret);
                            break;
//.........这里部分代码省略.........
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:101,代码来源:QueryFunctions.cs

示例12: IterateAndPushSequences

        internal static void IterateAndPushSequences(ProcessingContext context)
        {
            StackFrame sequences = context.TopSequenceArg;
            Value[] sequenceBuffer = context.Sequences;

            context.PushFrame();
            while (sequences.basePtr <= sequences.endPtr)
            {
                NodeSequence sourceSeq = sequenceBuffer[sequences.basePtr++].Sequence;
                int count = sourceSeq.Count;
                if (count == 0)
                {
                    context.PushSequence(NodeSequence.Empty);
                }
                else
                {
                    for (int item = 0; item < sourceSeq.Count; ++item)
                    {
                        NodeSequence newSequence = context.CreateSequence();
                        newSequence.StartNodeset();
                        newSequence.Add(ref sourceSeq.Items[item]);
                        newSequence.StopNodeset();
                        context.Push(newSequence);
                    }
                }
            }
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:27,代码来源:QueryFunctions.cs

示例13: BooleanTrue

 internal static void BooleanTrue(ProcessingContext context)
 {
     context.PushFrame();
     int count = context.IterationCount;
     if (count > 0)
     {
         context.Push(true, count);
     }
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:9,代码来源:QueryFunctions.cs

示例14: InitResults

 private void InitResults(ProcessingContext context)
 {
     context.PushFrame();
     context.Push(false, this.resultCount);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:BranchMatcher.cs

示例15: InvokeNonMatch

 private void InvokeNonMatch(ProcessingContext context, QueryBranch branch)
 {
     context.PushFrame();
     context.Push(false, this.resultCount);
     try
     {
         context.EvalCodeBlock(branch.Branch);
     }
     catch (XPathNavigatorException exception)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception.Process(branch.Branch));
     }
     catch (NavigatorInvalidBodyAccessException exception2)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception2.Process(branch.Branch));
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:BranchMatcher.cs


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