Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / WithParamAction.cs / 1 / WithParamAction.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.Collections; using System.Xml; using System.Xml.XPath; internal class WithParamAction : VariableAction { internal WithParamAction() : base(VariableType.WithParameter) {} internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CheckRequiredAttribute(compiler, this.name, Keywords.s_Name); if (compiler.Recurse()) { CompileTemplate(compiler); compiler.ToParent(); if (this.selectKey != Compiler.InvalidQueryKey && this.containedActions != null) { throw XsltException.Create(Res.Xslt_VariableCntSel2, this.nameStr); } } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); object ParamValue; switch(frame.State) { case Initialized: if (this.selectKey != Compiler.InvalidQueryKey) { ParamValue = processor.RunQuery(frame, this.selectKey); processor.SetParameter(this.name, ParamValue); frame.Finished(); } else { if (this.containedActions == null) { processor.SetParameter(this.name, string.Empty); frame.Finished(); break; } NavigatorOutput output = new NavigatorOutput(baseUri); processor.PushOutput(output); processor.PushActionFrame(frame); frame.State = ProcessingChildren; } break; case ProcessingChildren: RecordOutput recOutput = processor.PopOutput(); Debug.Assert(recOutput is NavigatorOutput); processor.SetParameter(this.name,((NavigatorOutput)recOutput).Navigator); frame.Finished(); break; default: Debug.Fail("Invalid execution state inside VariableAction.Execute"); 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.Collections; using System.Xml; using System.Xml.XPath; internal class WithParamAction : VariableAction { internal WithParamAction() : base(VariableType.WithParameter) {} internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CheckRequiredAttribute(compiler, this.name, Keywords.s_Name); if (compiler.Recurse()) { CompileTemplate(compiler); compiler.ToParent(); if (this.selectKey != Compiler.InvalidQueryKey && this.containedActions != null) { throw XsltException.Create(Res.Xslt_VariableCntSel2, this.nameStr); } } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); object ParamValue; switch(frame.State) { case Initialized: if (this.selectKey != Compiler.InvalidQueryKey) { ParamValue = processor.RunQuery(frame, this.selectKey); processor.SetParameter(this.name, ParamValue); frame.Finished(); } else { if (this.containedActions == null) { processor.SetParameter(this.name, string.Empty); frame.Finished(); break; } NavigatorOutput output = new NavigatorOutput(baseUri); processor.PushOutput(output); processor.PushActionFrame(frame); frame.State = ProcessingChildren; } break; case ProcessingChildren: RecordOutput recOutput = processor.PopOutput(); Debug.Assert(recOutput is NavigatorOutput); processor.SetParameter(this.name,((NavigatorOutput)recOutput).Navigator); frame.Finished(); break; default: Debug.Fail("Invalid execution state inside VariableAction.Execute"); 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
- SynchronizationHandlesCodeDomSerializer.cs
- DataSourceCache.cs
- DiagnosticTrace.cs
- ReadWriteObjectLock.cs
- DataError.cs
- DbProviderSpecificTypePropertyAttribute.cs
- AssertFilter.cs
- ContentPlaceHolderDesigner.cs
- MetadataSerializer.cs
- WebPartConnectionsEventArgs.cs
- FontDifferentiator.cs
- Itemizer.cs
- GreaterThan.cs
- SaveFileDialog.cs
- GroupByQueryOperator.cs
- FixedTextSelectionProcessor.cs
- DiagnosticsConfiguration.cs
- XmlSchemaGroup.cs
- Menu.cs
- GuidelineCollection.cs
- MatrixStack.cs
- ValueTable.cs
- NumberEdit.cs
- NativeMethods.cs
- InstanceData.cs
- OdbcConnection.cs
- QilCloneVisitor.cs
- UInt64Storage.cs
- TransactionTraceIdentifier.cs
- PrintDialogException.cs
- XmlSchemaSimpleContentRestriction.cs
- SiteMapPath.cs
- SystemDiagnosticsSection.cs
- ZipIOLocalFileHeader.cs
- ExtendedPropertiesHandler.cs
- WsiProfilesElement.cs
- GeneralTransform3DGroup.cs
- StylusPointPropertyId.cs
- DataGridViewComboBoxEditingControl.cs
- FontFaceLayoutInfo.cs
- ToolStripMenuItem.cs
- TypedTableBaseExtensions.cs
- SqlUserDefinedAggregateAttribute.cs
- HandlerWithFactory.cs
- WebEventTraceProvider.cs
- ComponentRenameEvent.cs
- SignatureHelper.cs
- Assert.cs
- ProtocolsSection.cs
- DbMetaDataFactory.cs
- GridViewDeleteEventArgs.cs
- XPathNavigator.cs
- MediaElementAutomationPeer.cs
- Condition.cs
- ChildrenQuery.cs
- PersonalizableAttribute.cs
- ActivityInstanceMap.cs
- ProfilePropertySettings.cs
- WS2007HttpBinding.cs
- CalloutQueueItem.cs
- SqlDataSourceCache.cs
- ImageFormat.cs
- Renderer.cs
- Propagator.ExtentPlaceholderCreator.cs
- TaskSchedulerException.cs
- RepeatButtonAutomationPeer.cs
- PeerNameRecordCollection.cs
- MetabaseSettings.cs
- GPRECT.cs
- ViewEventArgs.cs
- PageCache.cs
- DisplayInformation.cs
- WebBrowserPermission.cs
- HwndMouseInputProvider.cs
- InputLanguageCollection.cs
- TransactedBatchContext.cs
- GridItemProviderWrapper.cs
- CatalogPart.cs
- ImagingCache.cs
- RemotingServices.cs
- PseudoWebRequest.cs
- MultiAsyncResult.cs
- ErrorItem.cs
- DataPointer.cs
- SqlFacetAttribute.cs
- printdlgexmarshaler.cs
- RichTextBoxDesigner.cs
- FacetEnabledSchemaElement.cs
- Clock.cs
- NamedPipeActivation.cs
- EntitySqlQueryCacheEntry.cs
- ListParagraph.cs
- AuthenticationService.cs
- ProviderManager.cs
- PriorityQueue.cs
- CompositionTarget.cs
- DSASignatureFormatter.cs
- HtmlInputControl.cs
- SystemResources.cs
- UnsignedPublishLicense.cs