Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- InputLanguageEventArgs.cs
- storepermission.cs
- WindowsFormsHost.cs
- AccessedThroughPropertyAttribute.cs
- arc.cs
- BufferedMessageWriter.cs
- SelectionManager.cs
- MetaType.cs
- Match.cs
- coordinator.cs
- XmlText.cs
- PageHandlerFactory.cs
- FileDialogCustomPlacesCollection.cs
- ModulesEntry.cs
- TcpClientChannel.cs
- PeerNameRecord.cs
- FastEncoderWindow.cs
- UserControlParser.cs
- DataViewListener.cs
- Int64Converter.cs
- AdornerHitTestResult.cs
- OdbcErrorCollection.cs
- GridItem.cs
- WorkflowServiceNamespace.cs
- SBCSCodePageEncoding.cs
- XPathNavigatorReader.cs
- ModelItemKeyValuePair.cs
- ChannelServices.cs
- Rect.cs
- documentsequencetextview.cs
- SecurityHeaderTokenResolver.cs
- remotingproxy.cs
- TraceHwndHost.cs
- EventLogPermission.cs
- CompressedStack.cs
- XmlRootAttribute.cs
- ImageAttributes.cs
- ACE.cs
- ExplicitDiscriminatorMap.cs
- ProtocolViolationException.cs
- PersonalizableTypeEntry.cs
- DataStreamFromComStream.cs
- Image.cs
- Propagator.Evaluator.cs
- DataGridViewCellEventArgs.cs
- ClientCredentialsElement.cs
- RecognizerInfo.cs
- HttpModule.cs
- TablePatternIdentifiers.cs
- NameSpaceEvent.cs
- MemoryPressure.cs
- WizardStepBase.cs
- FileLogRecordHeader.cs
- pingexception.cs
- BatchServiceHost.cs
- sqlinternaltransaction.cs
- smtppermission.cs
- EdmConstants.cs
- RectAnimationBase.cs
- ContainerParagraph.cs
- RegexCompilationInfo.cs
- ToolbarAUtomationPeer.cs
- XpsDocument.cs
- ExpressionPrefixAttribute.cs
- BitmapSizeOptions.cs
- ObjectCache.cs
- SystemWebExtensionsSectionGroup.cs
- QueryOutputWriterV1.cs
- DataBinding.cs
- DbMetaDataFactory.cs
- SharedConnectionWorkflowTransactionService.cs
- XmlElementAttribute.cs
- RightNameExpirationInfoPair.cs
- SourceLineInfo.cs
- httpstaticobjectscollection.cs
- SignedXml.cs
- SettingsPropertyNotFoundException.cs
- InputMethod.cs
- PrintingPermissionAttribute.cs
- BamlLocalizableResourceKey.cs
- MapPathBasedVirtualPathProvider.cs
- FileDataSourceCache.cs
- CacheRequest.cs
- OutputCacheEntry.cs
- DataPager.cs
- MultiView.cs
- MultipleViewProviderWrapper.cs
- StrongTypingException.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- TileBrush.cs
- CalendarKeyboardHelper.cs
- ProtocolViolationException.cs
- ModelTreeManager.cs
- AnnotationMap.cs
- WebPartCatalogAddVerb.cs
- UnsafeNetInfoNativeMethods.cs
- FilePrompt.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- FormViewInsertedEventArgs.cs
- WindowsListView.cs