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 / CopyCodeAction.cs / 1 / 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
- PageCodeDomTreeGenerator.cs
- XPathNodePointer.cs
- XmlIncludeAttribute.cs
- SubpageParaClient.cs
- EpmSourceTree.cs
- EventWaitHandleSecurity.cs
- DCSafeHandle.cs
- GridViewSelectEventArgs.cs
- UndoManager.cs
- SiteMembershipCondition.cs
- xamlnodes.cs
- TemplateXamlTreeBuilder.cs
- XamlPathDataSerializer.cs
- ParserHooks.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DispatcherObject.cs
- WebPartRestoreVerb.cs
- TemplatedWizardStep.cs
- ObjectDataSource.cs
- TraceHandlerErrorFormatter.cs
- EventMappingSettings.cs
- PerfService.cs
- Bidi.cs
- ConfigurationLockCollection.cs
- ClockController.cs
- HttpHandlerAction.cs
- SessionEndingEventArgs.cs
- PathGradientBrush.cs
- UTF32Encoding.cs
- ConnectionManagementElement.cs
- WebConfigurationHostFileChange.cs
- Matrix3D.cs
- XmlSchemaInfo.cs
- DataPointer.cs
- Set.cs
- MulticastDelegate.cs
- LineServicesCallbacks.cs
- InputScopeManager.cs
- GregorianCalendarHelper.cs
- TypeElementCollection.cs
- TransactionChannelFactory.cs
- ShellProvider.cs
- RoutedPropertyChangedEventArgs.cs
- AutomationPropertyInfo.cs
- StorageEntityContainerMapping.cs
- EventWaitHandleSecurity.cs
- EntryPointNotFoundException.cs
- State.cs
- NegotiateStream.cs
- ControlBuilderAttribute.cs
- SafeFileHandle.cs
- XmlAttributeAttribute.cs
- MasterPage.cs
- RubberbandSelector.cs
- IssuanceLicense.cs
- DateTimeFormatInfoScanner.cs
- WebBrowserNavigatingEventHandler.cs
- CommonDialog.cs
- Adorner.cs
- SqlXmlStorage.cs
- UshortList2.cs
- TCPListener.cs
- HebrewNumber.cs
- X509ThumbprintKeyIdentifierClause.cs
- GuidConverter.cs
- CriticalFinalizerObject.cs
- TreeViewAutomationPeer.cs
- PrefixQName.cs
- TypeSource.cs
- RangeBase.cs
- TextRunProperties.cs
- XmlSchemaObjectTable.cs
- dbenumerator.cs
- LabelLiteral.cs
- MaskInputRejectedEventArgs.cs
- unitconverter.cs
- SplitContainer.cs
- Rights.cs
- CodeDirectoryCompiler.cs
- XmlDesignerDataSourceView.cs
- TextEndOfLine.cs
- EmbeddedObject.cs
- Input.cs
- ConnectionStringsSection.cs
- CodeTypeParameterCollection.cs
- HtmlEncodedRawTextWriter.cs
- XamlWriter.cs
- SqlUnionizer.cs
- TaskCanceledException.cs
- FeatureAttribute.cs
- AbstractSvcMapFileLoader.cs
- TemplateControlCodeDomTreeGenerator.cs
- BaseContextMenu.cs
- MDIClient.cs
- ImmutableObjectAttribute.cs
- ByteAnimation.cs
- DocumentOrderQuery.cs
- ClientScriptManager.cs
- CodeCommentStatementCollection.cs
- InputMethod.cs