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
- SymDocumentType.cs
- GridErrorDlg.cs
- FlagsAttribute.cs
- ContourSegment.cs
- RemotingSurrogateSelector.cs
- ActivityIdHeader.cs
- LineSegment.cs
- MenuItemBinding.cs
- XmlPropertyBag.cs
- ResourceExpressionBuilder.cs
- ToolboxBitmapAttribute.cs
- AuthorizationRuleCollection.cs
- StringComparer.cs
- MsmqIntegrationReceiveParameters.cs
- ObjectHandle.cs
- BooleanKeyFrameCollection.cs
- ZipIOCentralDirectoryFileHeader.cs
- TokenizerHelper.cs
- SqlComparer.cs
- Column.cs
- WizardPanel.cs
- ContainerControlDesigner.cs
- TabletDeviceInfo.cs
- Completion.cs
- AttachedPropertyDescriptor.cs
- _NTAuthentication.cs
- ChannelManagerService.cs
- GetIndexBinder.cs
- Border.cs
- UInt32.cs
- IisNotInstalledException.cs
- ParseChildrenAsPropertiesAttribute.cs
- DataViewSetting.cs
- HostVisual.cs
- DataSvcMapFileSerializer.cs
- PersonalizableAttribute.cs
- PropertyIDSet.cs
- COM2PropertyBuilderUITypeEditor.cs
- SqlEnums.cs
- DynamicPropertyReader.cs
- ClockController.cs
- ReadOnlyTernaryTree.cs
- EDesignUtil.cs
- SymbolResolver.cs
- SettingsPropertyNotFoundException.cs
- InteropBitmapSource.cs
- NavigateEvent.cs
- PersonalizationProviderHelper.cs
- StrokeRenderer.cs
- GetPageNumberCompletedEventArgs.cs
- ListViewGroup.cs
- ContainerVisual.cs
- TableCellCollection.cs
- XmlDomTextWriter.cs
- AccessDataSourceView.cs
- TextBoxBase.cs
- SQLInt16.cs
- MetadataExchangeBindings.cs
- DataGridViewCellConverter.cs
- SafeFileMapViewHandle.cs
- BindableTemplateBuilder.cs
- CodeGen.cs
- DataColumn.cs
- LingerOption.cs
- ConfigXmlText.cs
- MetadataItemSerializer.cs
- DetailsViewDeleteEventArgs.cs
- AuthenticationModulesSection.cs
- XPathSelectionIterator.cs
- DataGridCellInfo.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ErrorWebPart.cs
- DrawTreeNodeEventArgs.cs
- PassportPrincipal.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Vector3D.cs
- XmlEntity.cs
- SessionStateContainer.cs
- XmlUrlResolver.cs
- WindowsScroll.cs
- RuleInfoComparer.cs
- XmlDataSourceView.cs
- UnsafeNetInfoNativeMethods.cs
- TableStyle.cs
- DirectoryObjectSecurity.cs
- RelatedImageListAttribute.cs
- SimpleWorkerRequest.cs
- DataGridTextBoxColumn.cs
- ActiveXSerializer.cs
- SelectionEditingBehavior.cs
- ExtentKey.cs
- DictionaryEntry.cs
- WebPartZone.cs
- DependencyObjectType.cs
- ConfigPathUtility.cs
- Base64Decoder.cs
- SpecularMaterial.cs
- XmlQueryType.cs
- RightsManagementErrorHandler.cs
- ApplicationHost.cs