Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- FactoryRecord.cs
- AvTraceDetails.cs
- CounterSet.cs
- HttpException.cs
- TableSectionStyle.cs
- rsa.cs
- QuaternionAnimationUsingKeyFrames.cs
- ProbeMatchesCD1.cs
- SamlNameIdentifierClaimResource.cs
- FixedSOMElement.cs
- NamedPipeConnectionPoolSettingsElement.cs
- OwnerDrawPropertyBag.cs
- SafePEFileHandle.cs
- WebPart.cs
- Exceptions.cs
- ReadOnlyAttribute.cs
- CommandDevice.cs
- NamespaceCollection.cs
- ViewBox.cs
- Label.cs
- IfAction.cs
- TimeManager.cs
- indexingfiltermarshaler.cs
- WindowsGrip.cs
- PreservationFileWriter.cs
- AddInIpcChannel.cs
- propertytag.cs
- PolyBezierSegment.cs
- StyleHelper.cs
- GlobalizationSection.cs
- DataServiceQueryContinuation.cs
- XmlSchemaExternal.cs
- BuildProvider.cs
- SystemSounds.cs
- WebPartConnectionsConfigureVerb.cs
- OdbcHandle.cs
- MenuItemCollection.cs
- UshortList2.cs
- DataBoundControlAdapter.cs
- DataFormats.cs
- NavigationPropertyEmitter.cs
- CodeActivity.cs
- PropertyConverter.cs
- uribuilder.cs
- SimplePropertyEntry.cs
- returneventsaver.cs
- MdiWindowListStrip.cs
- GridPattern.cs
- XmlReturnWriter.cs
- ExtensionFile.cs
- HtmlToClrEventProxy.cs
- PerspectiveCamera.cs
- TableItemStyle.cs
- SystemResourceHost.cs
- DeclaredTypeValidator.cs
- CursorConverter.cs
- SQLCharsStorage.cs
- AttachmentService.cs
- SamlNameIdentifierClaimResource.cs
- ScrollChrome.cs
- QueryExecutionOption.cs
- ObjectQuery_EntitySqlExtensions.cs
- EventLogEntryCollection.cs
- WebServiceFaultDesigner.cs
- SchemaType.cs
- InternalConfigEventArgs.cs
- TranslateTransform3D.cs
- PlainXmlDeserializer.cs
- EditorZone.cs
- EntityProviderServices.cs
- CryptographicAttribute.cs
- MDIWindowDialog.cs
- TraceEventCache.cs
- ParallelQuery.cs
- PartBasedPackageProperties.cs
- _HTTPDateParse.cs
- VectorAnimationUsingKeyFrames.cs
- ObjectDisposedException.cs
- TagMapInfo.cs
- AssertSection.cs
- System.Data_BID.cs
- EventWaitHandle.cs
- SourceItem.cs
- XmlNamespaceManager.cs
- updatecommandorderer.cs
- DropDownList.cs
- ReadingWritingEntityEventArgs.cs
- ClickablePoint.cs
- FrameworkElementFactory.cs
- SoapRpcServiceAttribute.cs
- AddInEnvironment.cs
- FileAuthorizationModule.cs
- ModifierKeysValueSerializer.cs
- sqlpipe.cs
- ActivityBuilder.cs
- DefaultPropertyAttribute.cs
- BorderGapMaskConverter.cs
- AsymmetricCryptoHandle.cs
- DesigntimeLicenseContext.cs
- ValueProviderWrapper.cs