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 / 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
- ConnectionStringEditor.cs
- BuilderInfo.cs
- CollectionConverter.cs
- X509Certificate2Collection.cs
- ServerReliableChannelBinder.cs
- DbCommandTree.cs
- updateconfighost.cs
- MinMaxParagraphWidth.cs
- SmtpNegotiateAuthenticationModule.cs
- ConfigXmlDocument.cs
- MasterPage.cs
- AccessedThroughPropertyAttribute.cs
- InstalledVoice.cs
- HtmlInputCheckBox.cs
- XmlReader.cs
- SystemIPInterfaceProperties.cs
- DataChangedEventManager.cs
- ResourcePool.cs
- WindowsListViewGroup.cs
- FileUtil.cs
- FragmentNavigationEventArgs.cs
- XmlFormatReaderGenerator.cs
- TextServicesHost.cs
- ISCIIEncoding.cs
- ParameterElementCollection.cs
- UIElement3D.cs
- Compiler.cs
- DBBindings.cs
- VirtualPathProvider.cs
- MailWebEventProvider.cs
- TimeIntervalCollection.cs
- Line.cs
- RoutedEventHandlerInfo.cs
- WindowsTreeView.cs
- SerialErrors.cs
- TreeIterators.cs
- RemotingAttributes.cs
- Help.cs
- PackageFilter.cs
- ServiceX509SecurityTokenProvider.cs
- LinkLabel.cs
- SystemResources.cs
- TextEditorSelection.cs
- SapiRecoContext.cs
- WebPartUserCapability.cs
- ObjectStorage.cs
- DefaultBindingPropertyAttribute.cs
- ToolStripCollectionEditor.cs
- ApplicationSecurityInfo.cs
- XmlElement.cs
- HostTimeoutsElement.cs
- columnmapkeybuilder.cs
- ImpersonateTokenRef.cs
- _MultipleConnectAsync.cs
- ObjectHandle.cs
- UInt64Converter.cs
- ProtocolImporter.cs
- FixedSOMTableRow.cs
- MetadataFile.cs
- ResourceAssociationType.cs
- RectAnimationBase.cs
- ExpanderAutomationPeer.cs
- LayoutInformation.cs
- SelectionRange.cs
- ProfileServiceManager.cs
- RuntimeConfig.cs
- ConfigurationElementCollection.cs
- AbandonedMutexException.cs
- ImpersonateTokenRef.cs
- EntityDataSourceContextCreatedEventArgs.cs
- util.cs
- ParseNumbers.cs
- SqlUtils.cs
- DataGridViewRowsRemovedEventArgs.cs
- ConnectionStringsExpressionBuilder.cs
- FrameDimension.cs
- SimpleTypeResolver.cs
- HtmlControlPersistable.cs
- EndOfStreamException.cs
- RecordManager.cs
- ServiceReference.cs
- PrinterUnitConvert.cs
- WebServiceData.cs
- XmlSchemaExporter.cs
- FlatButtonAppearance.cs
- HScrollProperties.cs
- ResponseBodyWriter.cs
- ContractHandle.cs
- IgnoreSectionHandler.cs
- LayoutTableCell.cs
- ScrollPattern.cs
- UtilityExtension.cs
- StateMachineWorkflowInstance.cs
- Scheduling.cs
- FixedFindEngine.cs
- OperationCanceledException.cs
- ToolStrip.cs
- OperatingSystem.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- ToolStripManager.cs