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
- LinkLabel.cs
- ToolStripDropDownClosingEventArgs.cs
- QueryReaderSettings.cs
- SelectionProviderWrapper.cs
- BevelBitmapEffect.cs
- SortKey.cs
- ModelItem.cs
- CryptoStream.cs
- CodeIdentifier.cs
- ExpandCollapsePattern.cs
- Polyline.cs
- RegexFCD.cs
- SqlFactory.cs
- WebDisplayNameAttribute.cs
- NativeCompoundFileAPIs.cs
- _Connection.cs
- XamlTreeBuilder.cs
- WebSysDescriptionAttribute.cs
- SqlDataRecord.cs
- FamilyTypeface.cs
- MetaChildrenColumn.cs
- Documentation.cs
- RedirectionProxy.cs
- SocketInformation.cs
- ValidatorCompatibilityHelper.cs
- XslTransform.cs
- CultureInfoConverter.cs
- PerspectiveCamera.cs
- GridViewHeaderRowPresenter.cs
- Path.cs
- DataGridPagerStyle.cs
- SessionIDManager.cs
- BinaryUtilClasses.cs
- LZCodec.cs
- SqlProviderManifest.cs
- TabControlAutomationPeer.cs
- EventItfInfo.cs
- ScrollChrome.cs
- SchemaImporterExtensionElement.cs
- _NegoState.cs
- followingquery.cs
- ObjectSet.cs
- Pen.cs
- ModuleBuilderData.cs
- DoubleAnimationUsingKeyFrames.cs
- BaseHashHelper.cs
- HMAC.cs
- SqlTypesSchemaImporter.cs
- SqlFactory.cs
- PermissionListSet.cs
- NestedContainer.cs
- regiisutil.cs
- DriveInfo.cs
- BmpBitmapEncoder.cs
- XmlChildNodes.cs
- BasicKeyConstraint.cs
- BookmarkList.cs
- ToolstripProfessionalRenderer.cs
- NameObjectCollectionBase.cs
- Point3DAnimation.cs
- ForEachAction.cs
- CodeDOMUtility.cs
- DeferredReference.cs
- BitFlagsGenerator.cs
- SQLResource.cs
- TypeConverterHelper.cs
- Border.cs
- ConfigurationPermission.cs
- StorageScalarPropertyMapping.cs
- TrackBar.cs
- TextDecorationUnitValidation.cs
- CapabilitiesAssignment.cs
- ListenUriMode.cs
- AccessibleObject.cs
- WorkflowQueueInfo.cs
- RowUpdatingEventArgs.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- MetadataItem_Static.cs
- CultureTable.cs
- Command.cs
- HelpEvent.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CompiledRegexRunner.cs
- PathGeometry.cs
- ResourceProviderFactory.cs
- BeginGetFileNameFromUserRequest.cs
- PerformanceCounterLib.cs
- MaskedTextProvider.cs
- CompositeCollection.cs
- FrameworkElement.cs
- DbConnectionPoolIdentity.cs
- MatrixCamera.cs
- XPathSelfQuery.cs
- SchemaInfo.cs
- WpfSharedBamlSchemaContext.cs
- GridViewEditEventArgs.cs
- SoapEnumAttribute.cs
- MinimizableAttributeTypeConverter.cs
- EventHandlers.cs
- UnsignedPublishLicense.cs