Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / CommentAction.cs / 1 / CommentAction.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;
internal class CommentAction : ContainerAction {
internal override void Compile(Compiler compiler) {
CompileAttributes(compiler);
if (compiler.Recurse()) {
CompileTemplate(compiler);
compiler.ToParent();
}
}
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch (frame.State) {
case Initialized:
if (processor.BeginEvent(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, false) == false) {
// Come back later
break;
}
processor.PushActionFrame(frame);
frame.State = ProcessingChildren;
break; // Allow children to run
case ProcessingChildren:
if (processor.EndEvent(XPathNodeType.Comment) == false) {
break;
}
frame.Finished();
break;
default:
Debug.Fail("Invalid IfAction execution state");
break;
}
}
}
}
// 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;
internal class CommentAction : ContainerAction {
internal override void Compile(Compiler compiler) {
CompileAttributes(compiler);
if (compiler.Recurse()) {
CompileTemplate(compiler);
compiler.ToParent();
}
}
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch (frame.State) {
case Initialized:
if (processor.BeginEvent(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, false) == false) {
// Come back later
break;
}
processor.PushActionFrame(frame);
frame.State = ProcessingChildren;
break; // Allow children to run
case ProcessingChildren:
if (processor.EndEvent(XPathNodeType.Comment) == false) {
break;
}
frame.Finished();
break;
default:
Debug.Fail("Invalid IfAction execution state");
break;
}
}
}
}
// 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
- Memoizer.cs
- StrongNameIdentityPermission.cs
- SByte.cs
- PreviewControlDesigner.cs
- XmlnsCompatibleWithAttribute.cs
- StoryFragments.cs
- DefaultPropertyAttribute.cs
- HttpServerUtilityBase.cs
- InvalidPrinterException.cs
- ProfilePropertyMetadata.cs
- IntermediatePolicyValidator.cs
- DoubleAnimationUsingKeyFrames.cs
- Decimal.cs
- DetailsViewInsertEventArgs.cs
- PartialList.cs
- PartBasedPackageProperties.cs
- Configuration.cs
- SqlException.cs
- SafeTimerHandle.cs
- SafeCancelMibChangeNotify.cs
- LoginView.cs
- DynamicILGenerator.cs
- DataControlReferenceCollection.cs
- WorkflowInspectionServices.cs
- DataGridViewButtonCell.cs
- UtilityExtension.cs
- ApplyTemplatesAction.cs
- ValueUtilsSmi.cs
- RangeBaseAutomationPeer.cs
- SequenceRange.cs
- EventHandlerList.cs
- ZeroOpNode.cs
- SelectedCellsChangedEventArgs.cs
- ClientScriptManager.cs
- SupportsEventValidationAttribute.cs
- QueryCursorEventArgs.cs
- TextReader.cs
- FontEditor.cs
- SecurityElement.cs
- SimpleHandlerFactory.cs
- TransportReplyChannelAcceptor.cs
- ValueTypeFixupInfo.cs
- ItemCollection.cs
- MultiView.cs
- EdgeModeValidation.cs
- DrawingImage.cs
- AsyncResult.cs
- CodeCastExpression.cs
- ContextMenuAutomationPeer.cs
- WindowsRichEdit.cs
- SqlConnectionFactory.cs
- ContextQuery.cs
- IDictionary.cs
- Component.cs
- PropertyCollection.cs
- DataList.cs
- CompatibleIComparer.cs
- XDeferredAxisSource.cs
- ProcessModelInfo.cs
- PassportIdentity.cs
- TargetPerspective.cs
- XsdValidatingReader.cs
- TargetConverter.cs
- KeyedCollection.cs
- RankException.cs
- RemoteWebConfigurationHostStream.cs
- WebPartUtil.cs
- SimpleTableProvider.cs
- _NegotiateClient.cs
- OperationParameterInfoCollection.cs
- SqlColumnizer.cs
- TreeNode.cs
- QilCloneVisitor.cs
- SubstitutionResponseElement.cs
- BindingContext.cs
- SymLanguageType.cs
- FastEncoder.cs
- SqlConnectionPoolGroupProviderInfo.cs
- HostingEnvironmentException.cs
- RemoveStoryboard.cs
- RefreshEventArgs.cs
- Vector3D.cs
- FontFaceLayoutInfo.cs
- SystemResourceKey.cs
- Stream.cs
- PerformanceCounterPermissionEntry.cs
- ListenerConfig.cs
- DataGridViewButtonColumn.cs
- ContentOperations.cs
- MatrixValueSerializer.cs
- EUCJPEncoding.cs
- Comparer.cs
- _ListenerRequestStream.cs
- MarshalByValueComponent.cs
- ProfileEventArgs.cs
- SafeNativeMemoryHandle.cs
- AsymmetricCryptoHandle.cs
- EntityKeyElement.cs
- Label.cs
- EntityDataSourceWrapperCollection.cs