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
- GridViewColumnCollection.cs
- SchemaImporterExtensionElementCollection.cs
- basevalidator.cs
- HyperLink.cs
- ArgumentException.cs
- RegionData.cs
- ChildChangedEventArgs.cs
- CustomCategoryAttribute.cs
- EventLogQuery.cs
- StylusPointProperties.cs
- PenThreadWorker.cs
- XmlDictionary.cs
- EventWaitHandleSecurity.cs
- ActiveDesignSurfaceEvent.cs
- Renderer.cs
- HtmlMeta.cs
- CodeCastExpression.cs
- XmlTextReaderImpl.cs
- MobileListItem.cs
- CompilerWrapper.cs
- PlaceHolder.cs
- ChannelManager.cs
- StrokeNodeData.cs
- CodeNamespace.cs
- ViewBase.cs
- InvalidWMPVersionException.cs
- ProfilePropertyNameValidator.cs
- PropertyChangingEventArgs.cs
- DbProviderServices.cs
- Message.cs
- SqlClientPermission.cs
- TextSpanModifier.cs
- Queue.cs
- RMEnrollmentPage2.cs
- EncodingFallbackAwareXmlTextWriter.cs
- Cloud.cs
- PasswordPropertyTextAttribute.cs
- ProxyFragment.cs
- AdPostCacheSubstitution.cs
- log.cs
- EmptyEnumerator.cs
- SchemaName.cs
- Processor.cs
- Events.cs
- ActivityDesigner.cs
- HttpCachePolicyElement.cs
- Model3DCollection.cs
- PageThemeBuildProvider.cs
- SpotLight.cs
- Expression.cs
- ADMembershipUser.cs
- ListViewGroupConverter.cs
- PageOutputQuality.cs
- StorageMappingItemCollection.cs
- DataAdapter.cs
- BinarySerializer.cs
- DocumentGrid.cs
- HtmlValidatorAdapter.cs
- SparseMemoryStream.cs
- fixedPageContentExtractor.cs
- PersonalizationStateQuery.cs
- LogicalExpressionTypeConverter.cs
- BuildProviderCollection.cs
- DataBoundControl.cs
- CrossContextChannel.cs
- ExpressionBuilderContext.cs
- TextStore.cs
- SqlCacheDependencyDatabaseCollection.cs
- Compiler.cs
- EntityKey.cs
- SamlAdvice.cs
- NetworkCredential.cs
- PrinterSettings.cs
- GeometryConverter.cs
- GridViewHeaderRowPresenter.cs
- TextEditorCharacters.cs
- SqlClientWrapperSmiStreamChars.cs
- CompositeCollection.cs
- CustomAttributeSerializer.cs
- PackWebRequestFactory.cs
- RemotingException.cs
- EntityType.cs
- FileLogRecord.cs
- WebPartCatalogAddVerb.cs
- AsymmetricSignatureDeformatter.cs
- SecureStringHasher.cs
- TimeEnumHelper.cs
- DataBoundControl.cs
- PerformanceCounterCategory.cs
- SafeArrayTypeMismatchException.cs
- RtType.cs
- ClockGroup.cs
- ProvidersHelper.cs
- KeyboardDevice.cs
- ToolStripSeparatorRenderEventArgs.cs
- ReadOnlyDataSource.cs
- PriorityBindingExpression.cs
- ControlParameter.cs
- OleDbCommandBuilder.cs
- SBCSCodePageEncoding.cs