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


C# ProcessingContext.PopFrame方法代碼示例

本文整理匯總了C#中System.ServiceModel.Dispatcher.ProcessingContext.PopFrame方法的典型用法代碼示例。如果您正苦於以下問題:C# ProcessingContext.PopFrame方法的具體用法?C# ProcessingContext.PopFrame怎麽用?C# ProcessingContext.PopFrame使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.ServiceModel.Dispatcher.ProcessingContext的用法示例。


在下文中一共展示了ProcessingContext.PopFrame方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

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

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

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

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

示例5: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     int num = this.UpdateResultMask(context);
     context.PopFrame();
     if (num == 0)
     {
         return base.Jump;
     }
     return base.next;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:10,代碼來源:ApplyBooleanOpcode.cs

示例6: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     StackFrame secondArg = context.SecondArg;
     Value[] values = context.Values;
     int basePtr = topArg.basePtr;
     for (int i = secondArg.basePtr; basePtr <= topArg.endPtr; i++)
     {
         values[i].Add(values[basePtr].Double);
         basePtr++;
     }
     context.PopFrame();
     return base.next;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:14,代碼來源:PlusOpcode.cs

示例7: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     StackFrame secondArg = context.SecondArg;
     Value[] values = context.Values;
     while (topArg.basePtr <= topArg.endPtr)
     {
         values[secondArg.basePtr].Update(context, values[secondArg.basePtr].CompareTo(ref values[topArg.basePtr], this.op));
         topArg.basePtr++;
         secondArg.basePtr++;
     }
     context.PopFrame();
     return base.next;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:14,代碼來源:RelationOpcode.cs

示例8: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topArg = context.TopArg;
     StackFrame secondArg = context.SecondArg;
     int basePtr = topArg.basePtr;
     for (int i = secondArg.basePtr; basePtr <= topArg.endPtr; i++)
     {
         NodeSequence otherSeq = context.Values[basePtr].Sequence;
         NodeSequence sequence = context.Values[i].Sequence;
         context.SetValue(context, i, sequence.Union(context, otherSeq));
         basePtr++;
     }
     context.PopFrame();
     return base.next;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:15,代碼來源:UnionOpcode.cs

示例9: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            StackFrame argX = context.TopArg;
            StackFrame argY = context.SecondArg;
            Fx.Assert(argX.Count == argY.Count, "");

            Value[] values = context.Values;

            for (int x = argX.basePtr, y = argY.basePtr; x <= argX.endPtr; ++x, ++y)
            {
                Fx.Assert(values[x].IsType(ValueDataType.Double), "");
                Fx.Assert(values[y].IsType(ValueDataType.Double), "");
                values[y].Add(values[x].Double);
            }

            context.PopFrame();
            return this.next;
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:18,代碼來源:QueryMath.cs

示例10: Eval

        internal override Opcode Eval(ProcessingContext context)
        {
            StackFrame argX = context.TopArg;
            StackFrame argY = context.SecondArg;

            Fx.Assert(argX.Count == argY.Count, "");

            Value[] values = context.Values;
            while (argX.basePtr <= argX.endPtr)
            {
                values[argY.basePtr].Update(context, values[argY.basePtr].CompareTo(ref values[argX.basePtr], op));
                argX.basePtr++;
                argY.basePtr++;
            }

            context.PopFrame();
            return this.next;
        }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:18,代碼來源:QueryRelOp.cs

示例11: Eval

 internal override Opcode Eval(ProcessingContext context)
 {
     StackFrame topSequenceArg = context.TopSequenceArg;
     StackFrame topArg = context.TopArg;
     NodeSequenceBuilder builder = new NodeSequenceBuilder(context);
     Value[] sequences = context.Sequences;
     int basePtr = topSequenceArg.basePtr;
     int index = topArg.basePtr;
     while (basePtr <= topSequenceArg.endPtr)
     {
         NodeSequence sequence = sequences[basePtr].Sequence;
         if (sequence.Count > 0)
         {
             NodesetIterator iterator = new NodesetIterator(sequence);
             while (iterator.NextNodeset())
             {
                 builder.StartNodeset();
                 while (iterator.NextItem())
                 {
                     if (context.Values[index].Boolean)
                     {
                         builder.Add(ref sequence.Items[iterator.Index]);
                     }
                     index++;
                 }
                 builder.EndNodeset();
             }
             context.ReplaceSequenceAt(basePtr, builder.Sequence);
             context.ReleaseSequence(sequence);
             builder.Sequence = null;
         }
         basePtr++;
     }
     context.PopFrame();
     return base.next;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:36,代碼來源:ApplyFilterOpcode.cs

示例12: Translate

        internal static void Translate(ProcessingContext context)
        {
            StackFrame argSource = context.TopArg;
            StackFrame argKeys = context.SecondArg;
            StackFrame argValues = context[2];

            // PERF, [....], this is really slow.
            StringBuilder builder = new StringBuilder();
            while (argSource.basePtr <= argSource.endPtr)
            {
                builder.Length = 0;

                string source = context.PeekString(argSource.basePtr);
                string keys = context.PeekString(argKeys.basePtr);
                string values = context.PeekString(argValues.basePtr);
                for (int i = 0; i < source.Length; ++i)
                {
                    char c = source[i];
                    int idx = keys.IndexOf(c);
                    if (idx < 0)
                    {
                        builder.Append(c);
                    }
                    else if (idx < values.Length)
                    {
                        builder.Append(values[idx]);
                    }
                }
                context.SetValue(context, argValues.basePtr, builder.ToString());
                argSource.basePtr++;
                argKeys.basePtr++;
                argValues.basePtr++;
            }

            context.PopFrame();
            context.PopFrame();
        }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:37,代碼來源:QueryFunctions.cs

示例13: SubstringLimit

        internal static void SubstringLimit(ProcessingContext context)
        {
            StackFrame argString = context.TopArg;
            StackFrame argStartAt = context.SecondArg;
            StackFrame argLimit = context[2];

            Fx.Assert(argString.Count == argStartAt.Count, "");
            Fx.Assert(argString.Count == argLimit.Count, "");

            while (argString.basePtr <= argString.endPtr)
            {
                string str = context.PeekString(argString.basePtr);
                int startAt = ((int)Math.Round(context.PeekDouble(argStartAt.basePtr))) - 1;
                if (startAt < 0)
                {
                    startAt = 0;
                }
                int length = (int)Math.Round(context.PeekDouble(argLimit.basePtr));

                string substr;
                if (length < 1 || ((startAt + length) >= str.Length))
                {
                    substr = string.Empty;
                }
                else
                {
                    substr = str.Substring(startAt, length);
                }
                context.SetValue(context, argLimit.basePtr, substr);
                argStartAt.basePtr++;
                argString.basePtr++;
                argLimit.basePtr++;
            }

            context.PopFrame();
            context.PopFrame();
        }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:37,代碼來源:QueryFunctions.cs

示例14: Substring

        internal static void Substring(ProcessingContext context)
        {
            StackFrame arg1 = context.TopArg;
            StackFrame arg2 = context.SecondArg;

            Fx.Assert(arg1.Count == arg2.Count, "");
            while (arg1.basePtr <= arg1.endPtr)
            {
                string str = context.PeekString(arg1.basePtr);
                int startAt = ((int)Math.Round(context.PeekDouble(arg2.basePtr))) - 1;
                if (startAt < 0)
                {
                    startAt = 0;
                }
                context.SetValue(context, arg2.basePtr, (startAt >= str.Length) ? string.Empty : str.Substring(startAt));
                arg1.basePtr++;
                arg2.basePtr++;
            }
            context.PopFrame();
        }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:20,代碼來源:QueryFunctions.cs

示例15: SubstringAfter

        internal static void SubstringAfter(ProcessingContext context)
        {
            StackFrame arg1 = context.TopArg;
            StackFrame arg2 = context.SecondArg;

            Fx.Assert(arg1.Count == arg2.Count, "");
            while (arg1.basePtr <= arg1.endPtr)
            {
                string str1 = context.PeekString(arg1.basePtr);
                string str2 = context.PeekString(arg2.basePtr);
                int idx = str1.IndexOf(str2, StringComparison.Ordinal);
                context.SetValue(context, arg2.basePtr, idx == -1 ? string.Empty : str1.Substring(idx + str2.Length));
                arg1.basePtr++;
                arg2.basePtr++;
            }
            context.PopFrame();
        }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:17,代碼來源:QueryFunctions.cs


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