Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / QIL / QilFunction.cs / 1305376 / QilFunction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; namespace System.Xml.Xsl.Qil { ////// An anonymous QilExpression function node. /// ////// internal class QilFunction : QilReference { private QilNode arguments, definition, sideEffects; //----------------------------------------------- // Constructor //----------------------------------------------- ///Function is a block, so it may introduce assignments (scoped to the function body). /// Additionally, it has an argument list, which will be assigned values /// when the function is invoked. ///The XmlType property defines the expected return type of this function. /// Normally, this should be the same as its definition's types, so setting the function /// definition changes the function's types. In some rare cases, a compiler may wish to /// override the types after setting the function's definition (for example, an XQuery /// might define a function's return type to be wider than its definition would imply.) ////// Construct a node /// public QilFunction(QilNodeType nodeType, QilNode arguments, QilNode definition, QilNode sideEffects, XmlQueryType resultType) : base(nodeType) { this.arguments = arguments; this.definition = definition; this.sideEffects = sideEffects; this.xmlType = resultType; } //----------------------------------------------- // IListmethods -- override //----------------------------------------------- public override int Count { get { return 3; } } public override QilNode this[int index] { get { switch (index) { case 0: return this.arguments; case 1: return this.definition; case 2: return this.sideEffects; default: throw new IndexOutOfRangeException(); } } set { switch (index) { case 0: this.arguments = value; break; case 1: this.definition = value; break; case 2: this.sideEffects = value; break; default: throw new IndexOutOfRangeException(); } } } //----------------------------------------------- // QilFunction methods //----------------------------------------------- /// /// Formal arguments of this function. /// public QilList Arguments { get { return (QilList) this.arguments; } set { this.arguments = value; } } ////// Body of this function. /// public QilNode Definition { get { return this.definition; } set { this.definition = value; } } ////// QilNodeType.True if this function might have side-effects. /// public bool MaybeSideEffects { get { return this.sideEffects.NodeType == QilNodeType.True; } set { this.sideEffects.NodeType = value ? QilNodeType.True : QilNodeType.False; } } } } // 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
- XamlDesignerSerializationManager.cs
- _ListenerRequestStream.cs
- FontSizeConverter.cs
- AncillaryOps.cs
- TreeIterators.cs
- SimpleFileLog.cs
- HttpHeaderCollection.cs
- CommonRemoteMemoryBlock.cs
- StretchValidation.cs
- DataBinding.cs
- IndependentAnimationStorage.cs
- AnimationStorage.cs
- SchemaNotation.cs
- TaskForm.cs
- CaseInsensitiveOrdinalStringComparer.cs
- XmlBindingWorker.cs
- HandlerBase.cs
- _ConnectionGroup.cs
- XmlSignatureManifest.cs
- EdmSchemaError.cs
- TextProviderWrapper.cs
- ToolStripRenderEventArgs.cs
- PersonalizationProvider.cs
- GridLength.cs
- UnsafeNativeMethodsMilCoreApi.cs
- RequestNavigateEventArgs.cs
- PropertyTabChangedEvent.cs
- HelpProvider.cs
- PauseStoryboard.cs
- HatchBrush.cs
- DbParameterCollectionHelper.cs
- AtomMaterializerLog.cs
- WebPartZone.cs
- CheckBoxFlatAdapter.cs
- CompileXomlTask.cs
- AutoGeneratedField.cs
- Camera.cs
- ArgumentOutOfRangeException.cs
- HwndSubclass.cs
- AppSettingsExpressionBuilder.cs
- XmlCharacterData.cs
- AuthorizationRule.cs
- BooleanAnimationUsingKeyFrames.cs
- ToolboxComponentsCreatingEventArgs.cs
- TreeNodeStyleCollection.cs
- XmlAttributes.cs
- XmlBindingWorker.cs
- RectangleHotSpot.cs
- PersonalizationDictionary.cs
- ProvidersHelper.cs
- ZoneMembershipCondition.cs
- _OSSOCK.cs
- QilXmlWriter.cs
- DocumentXPathNavigator.cs
- XmlSchemaSequence.cs
- AddInController.cs
- RemotingConfigParser.cs
- AudioFormatConverter.cs
- GenericAuthenticationEventArgs.cs
- XmlValueConverter.cs
- ExpressionBuilderContext.cs
- WindowsEditBox.cs
- PolicyValidationException.cs
- CompiledXpathExpr.cs
- FaultContext.cs
- ListView.cs
- PeerFlooder.cs
- SystemSounds.cs
- MbpInfo.cs
- DictionarySectionHandler.cs
- MetadataHelper.cs
- HostingEnvironmentException.cs
- PassportAuthenticationEventArgs.cs
- XmlTypeAttribute.cs
- Typography.cs
- TableCellCollection.cs
- MouseGestureValueSerializer.cs
- SqlTypeSystemProvider.cs
- PathSegmentCollection.cs
- EventMappingSettings.cs
- MissingFieldException.cs
- CheckPair.cs
- Buffer.cs
- XmlC14NWriter.cs
- MetadataArtifactLoaderCompositeResource.cs
- GatewayDefinition.cs
- Thumb.cs
- CodeDOMUtility.cs
- RegexWriter.cs
- RightsManagementInformation.cs
- IdentifierCollection.cs
- ResourceContainer.cs
- WorkflowMessageEventArgs.cs
- VolatileEnlistmentState.cs
- DynamicDocumentPaginator.cs
- PersistenceMetadataNamespace.cs
- XmlSchemaCollection.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- WindowsToolbar.cs
- DescendantQuery.cs