Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XmlSchemaObjectTable.cs
- ServiceMemoryGates.cs
- FormViewUpdatedEventArgs.cs
- RegexTree.cs
- BuildTopDownAttribute.cs
- CapiNative.cs
- SiteMapDataSourceView.cs
- XmlObjectSerializerReadContext.cs
- DesignerObject.cs
- InheritanceContextHelper.cs
- ListItem.cs
- AgileSafeNativeMemoryHandle.cs
- Boolean.cs
- ExpressionBindingCollection.cs
- TextEditorCharacters.cs
- FreezableCollection.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ExclusiveHandleList.cs
- VirtualizingPanel.cs
- TableAdapterManagerGenerator.cs
- HandlerElement.cs
- VectorAnimationBase.cs
- BaseValidatorDesigner.cs
- BrushValueSerializer.cs
- SystemUdpStatistics.cs
- WebPartsPersonalization.cs
- CultureTableRecord.cs
- DefaultWorkflowTransactionService.cs
- XmlSubtreeReader.cs
- UnauthorizedWebPart.cs
- AsyncPostBackErrorEventArgs.cs
- AtomServiceDocumentSerializer.cs
- UnsignedPublishLicense.cs
- RegistrationServices.cs
- PageDeviceFont.cs
- AttributeTable.cs
- Preprocessor.cs
- RijndaelManaged.cs
- DataKeyArray.cs
- ResourcePool.cs
- ParameterToken.cs
- XPathBinder.cs
- WebReferencesBuildProvider.cs
- Visual3D.cs
- TabControl.cs
- MissingSatelliteAssemblyException.cs
- CultureMapper.cs
- TdsParser.cs
- XmlTextWriter.cs
- Metafile.cs
- ParallelTimeline.cs
- IOThreadTimer.cs
- FilterEventArgs.cs
- PropertyTabChangedEvent.cs
- CompilerGlobalScopeAttribute.cs
- LinqDataSourceUpdateEventArgs.cs
- ExpressionBuilderContext.cs
- SoapSchemaMember.cs
- SecureEnvironment.cs
- TagNameToTypeMapper.cs
- DesignerTransaction.cs
- LinkedResourceCollection.cs
- PropertyMap.cs
- TransformerConfigurationWizardBase.cs
- EdmFunctions.cs
- DataSet.cs
- DecimalAnimationBase.cs
- Util.cs
- XamlWriter.cs
- Peer.cs
- SoundPlayerAction.cs
- X509Extension.cs
- Decimal.cs
- HMAC.cs
- embossbitmapeffect.cs
- WorkflowShape.cs
- ContextMenuService.cs
- Activator.cs
- BuildProvidersCompiler.cs
- WsdlHelpGeneratorElement.cs
- ActiveXHost.cs
- PropertyGridCommands.cs
- ConfigXmlComment.cs
- RenderData.cs
- ConfigXmlElement.cs
- SharedStatics.cs
- TextSelectionProcessor.cs
- IntSecurity.cs
- ComponentConverter.cs
- VectorAnimation.cs
- LogWriteRestartAreaAsyncResult.cs
- WebPartConnectionsConnectVerb.cs
- WindowsFormsLinkLabel.cs
- StorageFunctionMapping.cs
- ISCIIEncoding.cs
- UIElement.cs
- CommandTreeTypeHelper.cs
- AddingNewEventArgs.cs
- VisualBrush.cs
- InfoCardSymmetricAlgorithm.cs