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
- PageThemeParser.cs
- SerializationObjectManager.cs
- MessageQueueConverter.cs
- StyleHelper.cs
- NonVisualControlAttribute.cs
- DefinitionBase.cs
- Point.cs
- XmlTextReaderImplHelpers.cs
- LateBoundBitmapDecoder.cs
- EventInfo.cs
- DockProviderWrapper.cs
- StreamWriter.cs
- ScriptResourceInfo.cs
- Calendar.cs
- TemplatePartAttribute.cs
- BehaviorService.cs
- DefaultBinder.cs
- CodeMethodReturnStatement.cs
- ResponseStream.cs
- serverconfig.cs
- EntityAdapter.cs
- AssemblyCollection.cs
- BindableTemplateBuilder.cs
- ResXBuildProvider.cs
- InputManager.cs
- MaskedTextProvider.cs
- HttpProfileBase.cs
- VBCodeProvider.cs
- NTAccount.cs
- DataGridViewRow.cs
- SqlBinder.cs
- ProtocolsSection.cs
- HttpRequestTraceRecord.cs
- IisTraceListener.cs
- ImageKeyConverter.cs
- WindowsProgressbar.cs
- TemplateXamlTreeBuilder.cs
- EncryptedPackageFilter.cs
- Attributes.cs
- Accessors.cs
- SoapElementAttribute.cs
- RSAOAEPKeyExchangeFormatter.cs
- CodeNamespace.cs
- RepeatBehaviorConverter.cs
- DataGridViewRowCollection.cs
- WindowsScrollBarBits.cs
- ManagementQuery.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- ClientCredentialsSecurityTokenManager.cs
- ApplicationBuildProvider.cs
- CustomWebEventKey.cs
- loginstatus.cs
- TableItemStyle.cs
- TrustLevelCollection.cs
- DataObjectEventArgs.cs
- EntityExpressionVisitor.cs
- nulltextcontainer.cs
- ManagementQuery.cs
- Utils.cs
- WindowsSpinner.cs
- SqlInfoMessageEvent.cs
- recordstate.cs
- AutomationAttributeInfo.cs
- CommonObjectSecurity.cs
- CustomSignedXml.cs
- MenuDesigner.cs
- IconHelper.cs
- WindowsListViewGroup.cs
- DeadCharTextComposition.cs
- DataBindingExpressionBuilder.cs
- DataFieldConverter.cs
- SqlConnectionStringBuilder.cs
- DelayedRegex.cs
- WindowsToolbar.cs
- WindowsFormsLinkLabel.cs
- ParameterToken.cs
- MenuEventArgs.cs
- StorageEntityContainerMapping.cs
- QueryExecutionOption.cs
- EastAsianLunisolarCalendar.cs
- MetadataCache.cs
- Focus.cs
- SchemaExporter.cs
- CodeFieldReferenceExpression.cs
- cache.cs
- FaultDesigner.cs
- DataKey.cs
- OLEDB_Util.cs
- ResourceDisplayNameAttribute.cs
- LoadRetryStrategyFactory.cs
- TextEditorThreadLocalStore.cs
- DatePickerAutomationPeer.cs
- PageParserFilter.cs
- CaseInsensitiveHashCodeProvider.cs
- DataGridViewTopLeftHeaderCell.cs
- RenderingEventArgs.cs
- ListDictionaryInternal.cs
- StructuredTypeEmitter.cs
- ChannelReliableSession.cs
- Marshal.cs