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
- SmiConnection.cs
- PersonalizationStateQuery.cs
- BulletedList.cs
- FormatterServicesNoSerializableCheck.cs
- StateMachineWorkflowInstance.cs
- Condition.cs
- safelinkcollection.cs
- DateTimeValueSerializerContext.cs
- XmlChildEnumerator.cs
- Quaternion.cs
- VisualTreeHelper.cs
- DirectoryGroupQuery.cs
- EncoderExceptionFallback.cs
- Win32KeyboardDevice.cs
- SystemIPGlobalProperties.cs
- LayoutTable.cs
- HostedTransportConfigurationBase.cs
- ZipPackagePart.cs
- HitTestFilterBehavior.cs
- SafeNativeMethods.cs
- WindowsIPAddress.cs
- FieldInfo.cs
- HTTPNotFoundHandler.cs
- DelayDesigner.cs
- PixelFormatConverter.cs
- ControlPaint.cs
- MessageDecoder.cs
- SQLMembershipProvider.cs
- CommandSet.cs
- AutoSizeComboBox.cs
- regiisutil.cs
- EventQueueState.cs
- XpsSerializationException.cs
- FloatUtil.cs
- ParallelTimeline.cs
- MediaTimeline.cs
- XPathDescendantIterator.cs
- CodeConditionStatement.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Int32Rect.cs
- SamlSerializer.cs
- StringSorter.cs
- TextShapeableCharacters.cs
- ManagementDateTime.cs
- GlyphInfoList.cs
- DataSet.cs
- InheritanceContextHelper.cs
- Int32AnimationUsingKeyFrames.cs
- ClassValidator.cs
- ValueChangedEventManager.cs
- DiscriminatorMap.cs
- ApplicationSecurityInfo.cs
- Triplet.cs
- DataGridRelationshipRow.cs
- Expressions.cs
- ReaderWriterLock.cs
- KeysConverter.cs
- ImageMap.cs
- WebPartVerbsEventArgs.cs
- SupportsEventValidationAttribute.cs
- KnownColorTable.cs
- ColorAnimation.cs
- DocumentScope.cs
- EndpointDispatcher.cs
- DragDropManager.cs
- DropDownButton.cs
- XmlSerializer.cs
- QilNode.cs
- ObsoleteAttribute.cs
- Guid.cs
- TreePrinter.cs
- ReadWriteSpinLock.cs
- Binding.cs
- PositiveTimeSpanValidator.cs
- AsymmetricSignatureDeformatter.cs
- MatrixKeyFrameCollection.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- CacheHelper.cs
- CompoundFileStorageReference.cs
- ConfigurationSectionGroupCollection.cs
- DataListAutoFormat.cs
- LayoutManager.cs
- DispatcherFrame.cs
- HttpWebResponse.cs
- ObjectItemAssemblyLoader.cs
- Win32.cs
- ImageIndexConverter.cs
- PropertyItem.cs
- SecurityKeyUsage.cs
- DetailsViewRowCollection.cs
- PointCollection.cs
- StyleHelper.cs
- UnsafeNativeMethodsPenimc.cs
- PersonalizableAttribute.cs
- ArraySortHelper.cs
- TextElementEnumerator.cs
- dataprotectionpermission.cs
- ClientBuildManagerCallback.cs
- MemoryMappedViewStream.cs
- PointConverter.cs