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
- StrokeCollectionDefaultValueFactory.cs
- SchemaImporterExtension.cs
- ManualResetEvent.cs
- SHA256Managed.cs
- ToolStripItemEventArgs.cs
- EditorPartCollection.cs
- XamlDesignerSerializationManager.cs
- FixedStringLookup.cs
- WeakEventManager.cs
- mediaclock.cs
- TypedElement.cs
- DrawingDrawingContext.cs
- SmtpFailedRecipientsException.cs
- PersistenceContext.cs
- ServiceHostingEnvironment.cs
- Transform3D.cs
- DBCommand.cs
- ClientSection.cs
- VisualStyleInformation.cs
- QueryConverter.cs
- ScalarOps.cs
- SkinBuilder.cs
- TemplateColumn.cs
- DataControlImageButton.cs
- xdrvalidator.cs
- DiagnosticsConfiguration.cs
- SmtpReplyReaderFactory.cs
- OutputCacheSettingsSection.cs
- SmiEventSink.cs
- ProviderConnectionPoint.cs
- FutureFactory.cs
- RoleGroupCollection.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- DictionaryChange.cs
- PauseStoryboard.cs
- Nullable.cs
- ListViewItem.cs
- CodeSubDirectory.cs
- LayoutUtils.cs
- InternalConfigRoot.cs
- ExplicitDiscriminatorMap.cs
- TextRangeSerialization.cs
- PointAnimationBase.cs
- DataGridViewDataErrorEventArgs.cs
- _ListenerRequestStream.cs
- Walker.cs
- Matrix3DConverter.cs
- DefaultValueAttribute.cs
- SoundPlayerAction.cs
- HMACSHA384.cs
- UITypeEditor.cs
- CodePrimitiveExpression.cs
- InvocationExpression.cs
- CompilerScopeManager.cs
- ComplexTypeEmitter.cs
- TouchDevice.cs
- ExpressionPrefixAttribute.cs
- LabelDesigner.cs
- EntityClassGenerator.cs
- TextBounds.cs
- DataGridViewComboBoxColumn.cs
- DataServiceQueryOfT.cs
- FormsAuthenticationTicket.cs
- AsnEncodedData.cs
- DrawItemEvent.cs
- ContainerSelectorBehavior.cs
- Color.cs
- Polygon.cs
- EntityDataSourceConfigureObjectContext.cs
- BaseParaClient.cs
- ResourceReferenceKeyNotFoundException.cs
- StoragePropertyMapping.cs
- BookmarkUndoUnit.cs
- MarkupProperty.cs
- OptimalBreakSession.cs
- StandardMenuStripVerb.cs
- FileEnumerator.cs
- DataServiceStreamResponse.cs
- XmlParserContext.cs
- StyleBamlRecordReader.cs
- PingReply.cs
- MsmqReceiveHelper.cs
- SupportsEventValidationAttribute.cs
- MsmqOutputMessage.cs
- DashStyles.cs
- HttpHandlersSection.cs
- ConfigurationLocation.cs
- HttpCacheParams.cs
- InstalledFontCollection.cs
- DateTimeOffset.cs
- CompilationSection.cs
- ScriptManager.cs
- CodeIdentifier.cs
- IfAction.cs
- RemoteWebConfigurationHostStream.cs
- TogglePatternIdentifiers.cs
- HttpHandlerAction.cs
- MethodSet.cs
- ItemCheckedEvent.cs
- RSATokenProvider.cs