Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / CopyCodeAction.cs / 1305376 / CopyCodeAction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.Diagnostics; using System.Xml; using System.Xml.XPath; using System.Collections; internal class CopyCodeAction : Action { // Execution states: private const int Outputting = 2; private ArrayList copyEvents; // Copy code action events internal CopyCodeAction() { this.copyEvents = new ArrayList(); } internal void AddEvent(Event copyEvent) { this.copyEvents.Add(copyEvent); } internal void AddEvents(ArrayList copyEvents) { Debug.Assert(copyEvents != null); this.copyEvents.AddRange(copyEvents); } internal override void ReplaceNamespaceAlias(Compiler compiler) { int count = this.copyEvents.Count; for(int i = 0; i< count; i++) { ((Event) this.copyEvents[i]).ReplaceNamespaceAlias(compiler); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); Debug.Assert(this.copyEvents != null && this.copyEvents.Count > 0); switch (frame.State) { case Initialized: frame.Counter = 0; frame.State = Outputting; goto case Outputting; case Outputting: Debug.Assert(frame.State == Outputting); while (processor.CanContinue) { Debug.Assert(frame.Counter < this.copyEvents.Count); Event copyEvent = (Event) this.copyEvents[frame.Counter]; if (copyEvent.Output(processor, frame) == false) { // This event wasn't processed break; } if (frame.IncrementCounter() >= this.copyEvents.Count) { frame.Finished(); break; } } break; default: Debug.Fail("Invalid CopyCodeAction execution state"); break; } } internal override DbgData GetDbgData(ActionFrame frame) { Debug.Assert(frame.Counter < this.copyEvents.Count); return ((Event)this.copyEvents[frame.Counter]).DbgData; } } } // 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.Diagnostics; using System.Xml; using System.Xml.XPath; using System.Collections; internal class CopyCodeAction : Action { // Execution states: private const int Outputting = 2; private ArrayList copyEvents; // Copy code action events internal CopyCodeAction() { this.copyEvents = new ArrayList(); } internal void AddEvent(Event copyEvent) { this.copyEvents.Add(copyEvent); } internal void AddEvents(ArrayList copyEvents) { Debug.Assert(copyEvents != null); this.copyEvents.AddRange(copyEvents); } internal override void ReplaceNamespaceAlias(Compiler compiler) { int count = this.copyEvents.Count; for(int i = 0; i< count; i++) { ((Event) this.copyEvents[i]).ReplaceNamespaceAlias(compiler); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); Debug.Assert(this.copyEvents != null && this.copyEvents.Count > 0); switch (frame.State) { case Initialized: frame.Counter = 0; frame.State = Outputting; goto case Outputting; case Outputting: Debug.Assert(frame.State == Outputting); while (processor.CanContinue) { Debug.Assert(frame.Counter < this.copyEvents.Count); Event copyEvent = (Event) this.copyEvents[frame.Counter]; if (copyEvent.Output(processor, frame) == false) { // This event wasn't processed break; } if (frame.IncrementCounter() >= this.copyEvents.Count) { frame.Finished(); break; } } break; default: Debug.Fail("Invalid CopyCodeAction execution state"); break; } } internal override DbgData GetDbgData(ActionFrame frame) { Debug.Assert(frame.Counter < this.copyEvents.Count); return ((Event)this.copyEvents[frame.Counter]).DbgData; } } } // 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
- ListItemParagraph.cs
- ProfileService.cs
- TableStyle.cs
- DataDocumentXPathNavigator.cs
- GeneralTransform.cs
- SystemResources.cs
- VirtualizingPanel.cs
- HiddenField.cs
- XmlQualifiedNameTest.cs
- FontFamilyValueSerializer.cs
- SubMenuStyle.cs
- XmlKeywords.cs
- FamilyMap.cs
- XmlRawWriter.cs
- TemplateNameScope.cs
- propertytag.cs
- EmbossBitmapEffect.cs
- XamlFigureLengthSerializer.cs
- SecurityUtils.cs
- TextContainer.cs
- EditingCommands.cs
- ShaperBuffers.cs
- Verify.cs
- LinqDataSourceDisposeEventArgs.cs
- CroppedBitmap.cs
- SemanticKeyElement.cs
- BitmapInitialize.cs
- Utility.cs
- dbdatarecord.cs
- CalendarDataBindingHandler.cs
- DocumentXmlWriter.cs
- RegisteredExpandoAttribute.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- ContextTokenTypeConverter.cs
- XmlSerializerSection.cs
- GeometryConverter.cs
- RowTypePropertyElement.cs
- MarkupWriter.cs
- GridViewRow.cs
- XPathScanner.cs
- CallbackTimeoutsElement.cs
- EntityDataSourceDataSelectionPanel.cs
- RemoteEndpointMessageProperty.cs
- IdentityNotMappedException.cs
- ProtocolsSection.cs
- Predicate.cs
- TypeUtil.cs
- uribuilder.cs
- RectKeyFrameCollection.cs
- DataObjectSettingDataEventArgs.cs
- SrgsRulesCollection.cs
- SequenceRange.cs
- Coordinator.cs
- PixelFormats.cs
- SurrogateEncoder.cs
- ChannelPoolSettingsElement.cs
- TrackBar.cs
- ModelUIElement3D.cs
- WebReferenceCollection.cs
- XmlArrayItemAttribute.cs
- SecureConversationServiceElement.cs
- TraceSwitch.cs
- ModelPerspective.cs
- EtwTrackingBehavior.cs
- IncrementalReadDecoders.cs
- OleAutBinder.cs
- ControlType.cs
- WebControl.cs
- ConsumerConnectionPointCollection.cs
- MULTI_QI.cs
- DataReaderContainer.cs
- TagPrefixCollection.cs
- ArithmeticException.cs
- __Error.cs
- Geometry.cs
- DataGridViewLayoutData.cs
- TypedTableBase.cs
- IgnoreSectionHandler.cs
- TraceHandler.cs
- MsmqBindingBase.cs
- MailSettingsSection.cs
- HtmlInputImage.cs
- MappingItemCollection.cs
- PlainXmlWriter.cs
- CacheAxisQuery.cs
- SocketElement.cs
- ListItemParagraph.cs
- ComplexLine.cs
- XmlSchemaGroup.cs
- CounterCreationData.cs
- IxmlLineInfo.cs
- ClientTarget.cs
- CommandConverter.cs
- XmlNamespaceManager.cs
- ServicePointManager.cs
- RemotingConfigParser.cs
- HttpWebRequest.cs
- ToolStripDropTargetManager.cs
- MimeBasePart.cs
- ExtractedStateEntry.cs