Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / MessageAction.cs / 1 / MessageAction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.IO; using System.Globalization; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class MessageAction : ContainerAction { bool _Terminate; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); if (compiler.Recurse()) { CompileTemplate(compiler); compiler.ToParent(); } } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Keywords.Equals(name, compiler.Atoms.Terminate)) { _Terminate = compiler.GetYesNo(value); } else { return false; } return true; } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: TextOnlyOutput output = new TextOnlyOutput(processor, new StringWriter(CultureInfo.InvariantCulture)); processor.PushOutput(output); processor.PushActionFrame(frame); frame.State = ProcessingChildren; break; case ProcessingChildren: TextOnlyOutput recOutput = processor.PopOutput() as TextOnlyOutput; Debug.Assert(recOutput != null); Console.WriteLine(recOutput.Writer.ToString()); if (_Terminate) { throw XsltException.Create(Res.Xslt_Terminate, recOutput.Writer.ToString()); } frame.Finished(); break; default: Debug.Fail("Invalid MessageAction execution state"); break; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.IO; using System.Globalization; using System.Diagnostics; using System.Xml; using System.Xml.XPath; internal class MessageAction : ContainerAction { bool _Terminate; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); if (compiler.Recurse()) { CompileTemplate(compiler); compiler.ToParent(); } } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Keywords.Equals(name, compiler.Atoms.Terminate)) { _Terminate = compiler.GetYesNo(value); } else { return false; } return true; } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: TextOnlyOutput output = new TextOnlyOutput(processor, new StringWriter(CultureInfo.InvariantCulture)); processor.PushOutput(output); processor.PushActionFrame(frame); frame.State = ProcessingChildren; break; case ProcessingChildren: TextOnlyOutput recOutput = processor.PopOutput() as TextOnlyOutput; Debug.Assert(recOutput != null); Console.WriteLine(recOutput.Writer.ToString()); if (_Terminate) { throw XsltException.Create(Res.Xslt_Terminate, recOutput.Writer.ToString()); } frame.Finished(); break; default: Debug.Fail("Invalid MessageAction execution state"); break; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SvcMapFileLoader.cs
- SqlDataSourceAdvancedOptionsForm.cs
- FlowDocumentReaderAutomationPeer.cs
- SubpageParagraph.cs
- EdmValidator.cs
- ResourceManager.cs
- GridPattern.cs
- AutomationIdentifier.cs
- OverlappedContext.cs
- MemberHolder.cs
- XamlSerializationHelper.cs
- ObjectManager.cs
- RecommendedAsConfigurableAttribute.cs
- IgnoreDataMemberAttribute.cs
- MimeMultiPart.cs
- SmiRequestExecutor.cs
- PropertyMap.cs
- GestureRecognitionResult.cs
- _Win32.cs
- AutomationPatternInfo.cs
- BaseParaClient.cs
- PriorityBinding.cs
- FullTextBreakpoint.cs
- NamespaceQuery.cs
- DbSetClause.cs
- FamilyMap.cs
- prefixendpointaddressmessagefiltertable.cs
- StatusBar.cs
- TypefaceMap.cs
- TemplateBamlTreeBuilder.cs
- TableCellCollection.cs
- CodeTypeMemberCollection.cs
- _TimerThread.cs
- PropertyReference.cs
- TableLayoutStyleCollection.cs
- EntityDataSourceDesigner.cs
- TextPattern.cs
- UniqueEventHelper.cs
- BitmapEncoder.cs
- PersonalizationStateInfoCollection.cs
- ResourceProperty.cs
- CoreSwitches.cs
- BaseDataBoundControl.cs
- ListComponentEditor.cs
- Stroke.cs
- PassportAuthenticationEventArgs.cs
- PerfProviderCollection.cs
- PropertyPathConverter.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DataGrid.cs
- AxParameterData.cs
- XamlTemplateSerializer.cs
- EqualityArray.cs
- DataGridViewLayoutData.cs
- LocatorGroup.cs
- DesignerVerbCollection.cs
- QilTypeChecker.cs
- MenuItem.cs
- PrintingPermissionAttribute.cs
- WebBrowserSiteBase.cs
- InkCanvasInnerCanvas.cs
- CodeLinePragma.cs
- TemplateField.cs
- CompoundFileDeflateTransform.cs
- StylusPointPropertyInfoDefaults.cs
- TypeElement.cs
- ToolStripRenderer.cs
- MessageBox.cs
- InstrumentationTracker.cs
- ExpressionBindingCollection.cs
- FontCacheUtil.cs
- VirtualDirectoryMapping.cs
- NumberFunctions.cs
- XmlIlGenerator.cs
- InkCanvasAutomationPeer.cs
- DefaultPropertyAttribute.cs
- DataSourceHelper.cs
- TextEffect.cs
- BaseDataListPage.cs
- SendMailErrorEventArgs.cs
- ListViewDataItem.cs
- ListViewItemEventArgs.cs
- Command.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ConfigXmlComment.cs
- TreeNodeStyle.cs
- UndoUnit.cs
- Bezier.cs
- PolyQuadraticBezierSegment.cs
- XsdCachingReader.cs
- WebServiceData.cs
- FormatterConverter.cs
- MessageAction.cs
- RotateTransform3D.cs
- PermissionRequestEvidence.cs
- CrossContextChannel.cs
- NativeMethodsCLR.cs
- StrokeNodeEnumerator.cs
- ItemCollection.cs
- ConvertTextFrag.cs