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
- ChangePassword.cs
- XmlSchemaGroup.cs
- SqlBuffer.cs
- ShaderEffect.cs
- WsdlWriter.cs
- WebPartManager.cs
- SafeEventLogWriteHandle.cs
- OledbConnectionStringbuilder.cs
- RelationshipConverter.cs
- MemberPath.cs
- StringAnimationUsingKeyFrames.cs
- X509Utils.cs
- SortedDictionary.cs
- GridErrorDlg.cs
- MergeEnumerator.cs
- CatalogPartChrome.cs
- TypeBuilder.cs
- SqlError.cs
- DocumentSequence.cs
- DocumentViewerAutomationPeer.cs
- ControlEvent.cs
- WebResourceAttribute.cs
- HtmlGenericControl.cs
- log.cs
- CalendarDesigner.cs
- CopyCodeAction.cs
- ParenthesizePropertyNameAttribute.cs
- TextServicesHost.cs
- AdRotator.cs
- CustomGrammar.cs
- RowsCopiedEventArgs.cs
- Geometry3D.cs
- TemplateBuilder.cs
- FamilyMapCollection.cs
- ClientBuildManagerCallback.cs
- ListMarkerSourceInfo.cs
- UserValidatedEventArgs.cs
- XmlSchemaExporter.cs
- TabControl.cs
- Range.cs
- SapiRecoInterop.cs
- ManipulationVelocities.cs
- Dump.cs
- SafeEventLogWriteHandle.cs
- TextChange.cs
- Size3DConverter.cs
- XmlArrayItemAttributes.cs
- PrePostDescendentsWalker.cs
- Vars.cs
- WebPartEditorCancelVerb.cs
- Evidence.cs
- EmptyImpersonationContext.cs
- SHA512Cng.cs
- SubpageParagraph.cs
- WindowsToolbarAsMenu.cs
- ThicknessAnimation.cs
- CompilationLock.cs
- EntryPointNotFoundException.cs
- WebConvert.cs
- PreApplicationStartMethodAttribute.cs
- OleDbEnumerator.cs
- BamlCollectionHolder.cs
- OleDbErrorCollection.cs
- DbConnectionPool.cs
- ScrollChangedEventArgs.cs
- StateManagedCollection.cs
- BinHexEncoder.cs
- SqlTypesSchemaImporter.cs
- TailCallAnalyzer.cs
- ProviderSettings.cs
- TextBoxView.cs
- ObjectReaderCompiler.cs
- GridPattern.cs
- CanExecuteRoutedEventArgs.cs
- IncrementalCompileAnalyzer.cs
- ProtectedConfigurationProviderCollection.cs
- HttpCacheParams.cs
- EmbeddedMailObject.cs
- CollectionExtensions.cs
- TemplateXamlParser.cs
- StyleTypedPropertyAttribute.cs
- TreeNodeEventArgs.cs
- ObjectDataSourceFilteringEventArgs.cs
- ObjectTokenCategory.cs
- MetadataArtifactLoaderComposite.cs
- Executor.cs
- AncillaryOps.cs
- EntitySetBaseCollection.cs
- EntityProviderFactory.cs
- BatchParser.cs
- TransformedBitmap.cs
- SizeConverter.cs
- SecurityResources.cs
- StrongName.cs
- WebMessageEncodingElement.cs
- TypeBinaryExpression.cs
- DirectoryObjectSecurity.cs
- OptimizedTemplateContent.cs
- XmlDataDocument.cs
- ColorInterpolationModeValidation.cs