本文整理汇总了C#中System.Xml.Xsl.XsltOld.Processor.CopyTextEvent方法的典型用法代码示例。如果您正苦于以下问题:C# Processor.CopyTextEvent方法的具体用法?C# Processor.CopyTextEvent怎么用?C# Processor.CopyTextEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Xsl.XsltOld.Processor
的用法示例。
在下文中一共展示了Processor.CopyTextEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendTextEvent
private static bool SendTextEvent(Processor processor, XPathNavigator node) {
return processor.CopyTextEvent(node);
}
示例2: Execute
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
while (processor.CanContinue) {
switch (frame.State) {
case Initialized:
if (Processor.IsRoot(frame.Node)) {
processor.PushActionFrame(frame);
frame.State = ChildrenOnly;
break;
}
if (processor.CopyBeginEvent(frame.Node, this.empty) == false) {
// This event wasn't processed
break;
}
frame.State = NamespaceCopy;
continue;
case NamespaceCopy:
frame.State = ContentsCopy;
if ( frame.Node.NodeType == XPathNodeType.Element ) {
processor.PushActionFrame(CopyNamespacesAction.GetAction(), frame.NodeSet);
break;
}
continue;
case ContentsCopy:
if (frame.Node.NodeType == XPathNodeType.Element && !this.empty) {
//Debug.Assert(frame.Node.HasValue == false);
processor.PushActionFrame(frame);
frame.State = ProcessChildren;
break;
}
else {
if (processor.CopyTextEvent(frame.Node)) {
frame.State = ProcessChildren;
continue;
}
else {
// This event wasn't processed
break;
}
}
case ProcessChildren:
if (processor.CopyEndEvent(frame.Node)) {
frame.Finished();
}
break;
case ChildrenOnly:
frame.Finished();
break;
default:
Debug.Fail("Invalid CopyAction execution state");
break;
}
break;
}
}