本文整理汇总了C#中System.ServiceModel.Dispatcher.ProcessingContext.PushFrame方法的典型用法代码示例。如果您正苦于以下问题:C# ProcessingContext.PushFrame方法的具体用法?C# ProcessingContext.PushFrame怎么用?C# ProcessingContext.PushFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ServiceModel.Dispatcher.ProcessingContext
的用法示例。
在下文中一共展示了ProcessingContext.PushFrame方法的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);
}
}
示例4: BooleanFalse
internal static void BooleanFalse(ProcessingContext context)
{
context.PushFrame();
int iterationCount = context.IterationCount;
if (iterationCount > 0)
{
context.Push(false, iterationCount);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
}
}
示例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;
//.........这里部分代码省略.........
示例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);
}
}
}
}
示例13: BooleanTrue
internal static void BooleanTrue(ProcessingContext context)
{
context.PushFrame();
int count = context.IterationCount;
if (count > 0)
{
context.Push(true, count);
}
}
示例14: InitResults
private void InitResults(ProcessingContext context)
{
context.PushFrame();
context.Push(false, this.resultCount);
}
示例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));
}
}