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
- FixUp.cs
- OutKeywords.cs
- SystemDiagnosticsSection.cs
- UdpConstants.cs
- TemplateBamlRecordReader.cs
- CurrentChangedEventManager.cs
- ProfileServiceManager.cs
- CollectionBase.cs
- ToolZoneDesigner.cs
- DataGridViewRowsRemovedEventArgs.cs
- SelectionPatternIdentifiers.cs
- SmiEventSink_Default.cs
- ArgumentValidation.cs
- _SpnDictionary.cs
- Triangle.cs
- ProtectedUri.cs
- SiteOfOriginContainer.cs
- PhonemeConverter.cs
- DictionaryTraceRecord.cs
- FrugalList.cs
- AdornerLayer.cs
- AttachInfo.cs
- ReferenceConverter.cs
- FunctionUpdateCommand.cs
- SortedList.cs
- SmiSettersStream.cs
- AuthenticationServiceManager.cs
- PolicyUnit.cs
- Panel.cs
- SqlServices.cs
- DispatcherFrame.cs
- XmlLangPropertyAttribute.cs
- InfoCardRSACryptoProvider.cs
- Assert.cs
- HandleCollector.cs
- TypeToken.cs
- WindowsGraphicsWrapper.cs
- ToolStripAdornerWindowService.cs
- SecurityChannelFaultConverter.cs
- DesignerTransactionCloseEvent.cs
- DataGridViewCheckBoxColumn.cs
- RuntimeIdentifierPropertyAttribute.cs
- FilterElement.cs
- DeleteIndexBinder.cs
- XmlValidatingReaderImpl.cs
- LinqDataSourceHelper.cs
- SQLGuid.cs
- SafeRightsManagementPubHandle.cs
- GroupByQueryOperator.cs
- DesignerMetadata.cs
- ScriptingRoleServiceSection.cs
- MasterPageBuildProvider.cs
- XmlArrayItemAttribute.cs
- MetadataArtifactLoaderComposite.cs
- GB18030Encoding.cs
- EventArgs.cs
- CookieProtection.cs
- DataGridViewColumnStateChangedEventArgs.cs
- XsdCachingReader.cs
- DataGridViewCell.cs
- TypeSemantics.cs
- ZipIOExtraFieldPaddingElement.cs
- CustomAttributeSerializer.cs
- XmlParserContext.cs
- SystemFonts.cs
- EditorOptionAttribute.cs
- TextEditorContextMenu.cs
- DateTimeConverter.cs
- JournalEntryStack.cs
- PrimitiveCodeDomSerializer.cs
- ContainerUIElement3D.cs
- RuleSetDialog.Designer.cs
- AssemblyCollection.cs
- HoistedLocals.cs
- InputLangChangeEvent.cs
- Parameter.cs
- GACIdentityPermission.cs
- XPathScanner.cs
- DesignerVerbToolStripMenuItem.cs
- CaseStatementProjectedSlot.cs
- RemoteWebConfigurationHostStream.cs
- Highlights.cs
- ScriptReferenceEventArgs.cs
- TransactionException.cs
- DescendentsWalkerBase.cs
- DecimalFormatter.cs
- LayoutEditorPart.cs
- BypassElement.cs
- HtmlInputText.cs
- LocalIdKeyIdentifierClause.cs
- MenuEventArgs.cs
- Evidence.cs
- HandlerFactoryCache.cs
- DataGridViewColumnDesigner.cs
- UnorderedHashRepartitionStream.cs
- SqlDelegatedTransaction.cs
- WebPartTransformerCollection.cs
- ContentOperations.cs
- UIAgentRequest.cs
- StateBag.cs