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
- CompModSwitches.cs
- DbProviderFactories.cs
- ConfigXmlSignificantWhitespace.cs
- HttpHeaderCollection.cs
- Light.cs
- FixedPage.cs
- odbcmetadatafactory.cs
- AssemblyBuilder.cs
- TableItemStyle.cs
- FaultReasonText.cs
- RotationValidation.cs
- InstalledFontCollection.cs
- EntityContainerEntitySet.cs
- RuleValidation.cs
- Byte.cs
- ItemCollection.cs
- FormatConvertedBitmap.cs
- ConnectionStringSettings.cs
- MethodExpr.cs
- _SecureChannel.cs
- UnionCodeGroup.cs
- Application.cs
- CheckBoxList.cs
- filewebresponse.cs
- ObjectDataSourceChooseTypePanel.cs
- ValidatorCollection.cs
- SoapReflectionImporter.cs
- AuthenticateEventArgs.cs
- ImageField.cs
- ResumeStoryboard.cs
- ContractCodeDomInfo.cs
- TransactedBatchingElement.cs
- CodeGenerator.cs
- SemanticResultKey.cs
- XmlBinaryReader.cs
- MaskedTextBoxDesignerActionList.cs
- DiffuseMaterial.cs
- SequentialWorkflowHeaderFooter.cs
- HTMLTagNameToTypeMapper.cs
- NetworkStream.cs
- ViewStateException.cs
- XmlSchemaAttributeGroup.cs
- SelfIssuedAuthRSACryptoProvider.cs
- ImmutableCollection.cs
- XamlDesignerSerializationManager.cs
- WindowInteractionStateTracker.cs
- BitmapEffectGeneralTransform.cs
- QueryAsyncResult.cs
- DiscreteKeyFrames.cs
- InstanceDescriptor.cs
- MainMenu.cs
- File.cs
- UIHelper.cs
- XmlArrayItemAttributes.cs
- Visual3DCollection.cs
- SectionVisual.cs
- ConnectionPoolManager.cs
- PerformanceCounterPermission.cs
- LinearGradientBrush.cs
- InkCanvasAutomationPeer.cs
- SchemaTypeEmitter.cs
- templategroup.cs
- SmiXetterAccessMap.cs
- ExecutionContext.cs
- TimeoutStream.cs
- AffineTransform3D.cs
- ConfigurationStrings.cs
- VisualStyleTypesAndProperties.cs
- SqlDataSourceCommandEventArgs.cs
- InitializationEventAttribute.cs
- MembershipUser.cs
- RegexMatchCollection.cs
- CompatibleIComparer.cs
- StylusCaptureWithinProperty.cs
- InputLanguage.cs
- SqlCacheDependency.cs
- TextSpan.cs
- CuspData.cs
- CultureSpecificCharacterBufferRange.cs
- PolicyDesigner.cs
- ModuleElement.cs
- NameValueSectionHandler.cs
- MatrixUtil.cs
- PropertyValueChangedEvent.cs
- KnownTypes.cs
- IntSecurity.cs
- WindowCollection.cs
- SimpleColumnProvider.cs
- X509ServiceCertificateAuthenticationElement.cs
- SafeNativeMethods.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- LocatorManager.cs
- BaseInfoTable.cs
- RepeaterDataBoundAdapter.cs
- ILGen.cs
- GridViewCancelEditEventArgs.cs
- QueryContinueDragEventArgs.cs
- ManagementException.cs
- SendActivityValidator.cs
- WinEventQueueItem.cs