Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / newinstructionaction.cs / 1305376 / newinstructionaction.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 NewInstructionAction : ContainerAction {
string name;
string parent;
bool fallback;
internal override void Compile(Compiler compiler) {
XPathNavigator nav = compiler.Input.Navigator.Clone();
name = nav.Name;
nav.MoveToParent();
parent = nav.Name;
if (compiler.Recurse()) {
CompileSelectiveTemplate(compiler);
compiler.ToParent();
}
}
internal void CompileSelectiveTemplate(Compiler compiler){
NavigatorInput input = compiler.Input;
do{
if (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl) &&
Ref.Equal(input.LocalName, input.Atoms.Fallback)){
fallback = true;
if (compiler.Recurse()){
CompileTemplate(compiler);
compiler.ToParent();
}
}
}
while (compiler.Advance());
}
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch (frame.State) {
case Initialized:
if (!fallback) {
throw XsltException.Create(Res.Xslt_UnknownExtensionElement, this.name);
}
if (this.containedActions != null && this.containedActions.Count > 0) {
processor.PushActionFrame(frame);
frame.State = ProcessingChildren;
break;
}
else goto case ProcessingChildren;
case ProcessingChildren:
frame.Finished();
break;
default:
Debug.Fail("Invalid Container action 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 NewInstructionAction : ContainerAction {
string name;
string parent;
bool fallback;
internal override void Compile(Compiler compiler) {
XPathNavigator nav = compiler.Input.Navigator.Clone();
name = nav.Name;
nav.MoveToParent();
parent = nav.Name;
if (compiler.Recurse()) {
CompileSelectiveTemplate(compiler);
compiler.ToParent();
}
}
internal void CompileSelectiveTemplate(Compiler compiler){
NavigatorInput input = compiler.Input;
do{
if (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl) &&
Ref.Equal(input.LocalName, input.Atoms.Fallback)){
fallback = true;
if (compiler.Recurse()){
CompileTemplate(compiler);
compiler.ToParent();
}
}
}
while (compiler.Advance());
}
internal override void Execute(Processor processor, ActionFrame frame) {
Debug.Assert(processor != null && frame != null);
switch (frame.State) {
case Initialized:
if (!fallback) {
throw XsltException.Create(Res.Xslt_UnknownExtensionElement, this.name);
}
if (this.containedActions != null && this.containedActions.Count > 0) {
processor.PushActionFrame(frame);
frame.State = ProcessingChildren;
break;
}
else goto case ProcessingChildren;
case ProcessingChildren:
frame.Finished();
break;
default:
Debug.Fail("Invalid Container action 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
- Slider.cs
- CheckBoxList.cs
- TreeView.cs
- TypeHelper.cs
- BrowserCapabilitiesFactoryBase.cs
- CompilationLock.cs
- NonValidatingSecurityTokenAuthenticator.cs
- XmlSchemaSequence.cs
- AddInEnvironment.cs
- ColumnResizeAdorner.cs
- DependencyPropertyConverter.cs
- XmlTextReader.cs
- DataContractSerializerSection.cs
- UTF7Encoding.cs
- HtmlInputSubmit.cs
- SapiRecoInterop.cs
- GroupLabel.cs
- DataSourceComponent.cs
- RegexBoyerMoore.cs
- Schedule.cs
- SiteMap.cs
- AssertFilter.cs
- ConnectionsZone.cs
- ToolStripArrowRenderEventArgs.cs
- InertiaTranslationBehavior.cs
- PageVisual.cs
- ProfileSettings.cs
- JpegBitmapEncoder.cs
- KnownTypesHelper.cs
- MsmqDiagnostics.cs
- Run.cs
- ParameterModifier.cs
- StrongNameMembershipCondition.cs
- OdbcInfoMessageEvent.cs
- CrossContextChannel.cs
- XPathDocumentBuilder.cs
- ConfigXmlElement.cs
- StrokeNodeOperations2.cs
- XmlSchemaComplexContent.cs
- FigureParaClient.cs
- PackWebResponse.cs
- SecureEnvironment.cs
- SelectionItemProviderWrapper.cs
- webclient.cs
- KeyEventArgs.cs
- DoubleSumAggregationOperator.cs
- Lookup.cs
- ReadOnlyHierarchicalDataSource.cs
- OneOfScalarConst.cs
- ColumnResult.cs
- TreeNodeStyleCollection.cs
- SamlConditions.cs
- Matrix3DConverter.cs
- StreamHelper.cs
- WebPartConnectionsCancelVerb.cs
- DashStyles.cs
- Optimizer.cs
- TableRowGroup.cs
- MenuItemStyle.cs
- TextTreeObjectNode.cs
- DesignerRegionCollection.cs
- EventSetter.cs
- DefaultWorkflowSchedulerService.cs
- ConcurrentQueue.cs
- ClipboardData.cs
- WebHeaderCollection.cs
- SubMenuStyleCollection.cs
- OdbcPermission.cs
- ProofTokenCryptoHandle.cs
- UpdateManifestForBrowserApplication.cs
- CachedPathData.cs
- XMLUtil.cs
- RichTextBoxConstants.cs
- PropertyHelper.cs
- MetadataWorkspace.cs
- DataObjectCopyingEventArgs.cs
- AuthenticationConfig.cs
- SqlDataSource.cs
- MemberRestriction.cs
- SQLDateTime.cs
- DocumentCollection.cs
- DataSourceSelectArguments.cs
- TaiwanCalendar.cs
- DataGridLength.cs
- DocumentReference.cs
- ViewStateModeByIdAttribute.cs
- StringFormat.cs
- XLinq.cs
- ControlAdapter.cs
- FieldNameLookup.cs
- SafeCryptoHandles.cs
- WorkflowStateRollbackService.cs
- PolyBezierSegment.cs
- XsdValidatingReader.cs
- SafeThreadHandle.cs
- ResXResourceReader.cs
- DesignerDataView.cs
- DataGridViewHeaderCell.cs
- Effect.cs
- ChooseAction.cs