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
- ClientFormsIdentity.cs
- OdbcInfoMessageEvent.cs
- AdornerHitTestResult.cs
- MemoryPressure.cs
- PathSegmentCollection.cs
- MetadataItemSerializer.cs
- XmlNavigatorFilter.cs
- ClientBuildManager.cs
- XmlSchemaInfo.cs
- IxmlLineInfo.cs
- CodeStatement.cs
- METAHEADER.cs
- TemplateControlBuildProvider.cs
- NativeWindow.cs
- Point3DValueSerializer.cs
- FormsAuthentication.cs
- SqlUtil.cs
- BamlLocalizableResource.cs
- LicenseContext.cs
- MessageEncoderFactory.cs
- newinstructionaction.cs
- TableRow.cs
- TextTreeUndoUnit.cs
- DiscoveryMessageSequenceCD1.cs
- Cursor.cs
- MasterPageParser.cs
- ValidationSummary.cs
- TimeSpanValidator.cs
- UnmanagedMemoryStream.cs
- HttpsHostedTransportConfiguration.cs
- DirectoryObjectSecurity.cs
- storepermission.cs
- BaseParagraph.cs
- ScriptComponentDescriptor.cs
- ActivityBuilderHelper.cs
- basecomparevalidator.cs
- IndentedWriter.cs
- DateTimeConverter.cs
- Size3DConverter.cs
- cache.cs
- StandardCommandToolStripMenuItem.cs
- LineBreak.cs
- UIPermission.cs
- Select.cs
- WpfWebRequestHelper.cs
- BlurEffect.cs
- XmlHierarchyData.cs
- MULTI_QI.cs
- DataColumn.cs
- ExpressionBuilder.cs
- DataGridViewRowPostPaintEventArgs.cs
- PropertyGridEditorPart.cs
- RequiredFieldValidator.cs
- Comparer.cs
- KeyValueInternalCollection.cs
- ConfigurationManagerHelper.cs
- DSACryptoServiceProvider.cs
- IxmlLineInfo.cs
- ElapsedEventArgs.cs
- UdpDuplexChannel.cs
- CurrencyManager.cs
- CriticalFinalizerObject.cs
- EntityStoreSchemaGenerator.cs
- SafeFileMappingHandle.cs
- RevocationPoint.cs
- ToolStripContainer.cs
- SerializationHelper.cs
- SplitterEvent.cs
- CellLabel.cs
- CompModSwitches.cs
- XmlQueryType.cs
- HttpContextServiceHost.cs
- WebConfigurationManager.cs
- AsyncStreamReader.cs
- ImportOptions.cs
- Padding.cs
- DocumentOrderComparer.cs
- DuplicateWaitObjectException.cs
- SoapEnumAttribute.cs
- ProcessHostServerConfig.cs
- SapiRecognizer.cs
- SerializationEventsCache.cs
- TraceRecords.cs
- RuntimeConfigLKG.cs
- ProfilePropertySettingsCollection.cs
- DataList.cs
- XmlComplianceUtil.cs
- MenuRendererClassic.cs
- XmlSubtreeReader.cs
- DateTimeUtil.cs
- BufferedGraphicsManager.cs
- ObjectDataSourceView.cs
- SQLSingleStorage.cs
- ColumnBinding.cs
- DocumentViewerBaseAutomationPeer.cs
- TextRangeAdaptor.cs
- Ticks.cs
- WinEventQueueItem.cs
- ApplicationSettingsBase.cs
- ObjectItemCachedAssemblyLoader.cs