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
- WindowsFormsHelpers.cs
- ViewSimplifier.cs
- KoreanCalendar.cs
- Control.cs
- WebPartPersonalization.cs
- File.cs
- ClientSettingsProvider.cs
- BasicHttpSecurityMode.cs
- StrokeRenderer.cs
- XPathScanner.cs
- HttpCachePolicyElement.cs
- OleDbDataReader.cs
- MultiPartWriter.cs
- AuthenticationServiceManager.cs
- ValidatingReaderNodeData.cs
- RegularExpressionValidator.cs
- ExpressionBuilderCollection.cs
- CatalogZoneAutoFormat.cs
- IndexedString.cs
- ParseHttpDate.cs
- HtmlInputRadioButton.cs
- AutomationElement.cs
- BaseParaClient.cs
- WindowsSysHeader.cs
- NonceCache.cs
- HttpStaticObjectsCollectionBase.cs
- SystemIPGlobalStatistics.cs
- WebPartConnectionsDisconnectVerb.cs
- PropertyToken.cs
- WindowCollection.cs
- OperationAbortedException.cs
- ConcurrentStack.cs
- ListViewItemMouseHoverEvent.cs
- UnsafeNativeMethods.cs
- TypeKeyValue.cs
- RecordBuilder.cs
- PolicyManager.cs
- DrawToolTipEventArgs.cs
- FixedSOMElement.cs
- HttpFileCollection.cs
- Evaluator.cs
- ExecutionEngineException.cs
- DialogResultConverter.cs
- StylesEditorDialog.cs
- PageVisual.cs
- EncoderNLS.cs
- ConfigurationManagerHelperFactory.cs
- SmtpReplyReaderFactory.cs
- DnsCache.cs
- WebPartVerbsEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- ControlBuilder.cs
- Path.cs
- Attributes.cs
- AsyncOperationManager.cs
- DefaultExpression.cs
- brushes.cs
- NegationPusher.cs
- ObjectHelper.cs
- SqlFlattener.cs
- XmlTypeAttribute.cs
- ResourceCategoryAttribute.cs
- RunInstallerAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- TextEffect.cs
- RectangleGeometry.cs
- BuildProvidersCompiler.cs
- CodeAttachEventStatement.cs
- _SslSessionsCache.cs
- DocumentPageViewAutomationPeer.cs
- DataGridViewLinkColumn.cs
- TakeOrSkipQueryOperator.cs
- Stackframe.cs
- MediaCommands.cs
- PersistenceProviderElement.cs
- EntitySqlQueryState.cs
- sqlnorm.cs
- ReadOnlyDictionary.cs
- RealProxy.cs
- ProviderManager.cs
- EncoderParameters.cs
- HttpProfileGroupBase.cs
- ConfigsHelper.cs
- LinearGradientBrush.cs
- X509Extension.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- LayoutDump.cs
- shaper.cs
- IOException.cs
- TdsEnums.cs
- HttpHandlerAction.cs
- EncryptedKeyIdentifierClause.cs
- HttpCachePolicy.cs
- RegistryConfigurationProvider.cs
- MultiViewDesigner.cs
- CompareValidator.cs
- EpmSourcePathSegment.cs
- SqlDependencyListener.cs
- MailAddressCollection.cs
- NameValueConfigurationCollection.cs