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
- CodeSubDirectoriesCollection.cs
- TemporaryBitmapFile.cs
- TabItem.cs
- ModelTreeEnumerator.cs
- ServiceHostingEnvironment.cs
- AttributeAction.cs
- Form.cs
- RoleService.cs
- WebPartDeleteVerb.cs
- OperationFormatter.cs
- KeyPressEvent.cs
- RenderDataDrawingContext.cs
- FormatVersion.cs
- ScriptingJsonSerializationSection.cs
- ToolboxDataAttribute.cs
- BooleanSwitch.cs
- InvalidProgramException.cs
- ClientSettingsProvider.cs
- WebScriptServiceHostFactory.cs
- PenContext.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataControlPagerLinkButton.cs
- BookmarkEventArgs.cs
- TextBoxDesigner.cs
- XmlAutoDetectWriter.cs
- HandlerBase.cs
- EventLogException.cs
- initElementDictionary.cs
- TemplateColumn.cs
- DefaultCommandExtensionCallback.cs
- SqlDataSourceStatusEventArgs.cs
- GroupQuery.cs
- SqlException.cs
- WebService.cs
- PropertyItem.cs
- DataColumnCollection.cs
- DocumentScope.cs
- RenderCapability.cs
- KeyedCollection.cs
- SynthesizerStateChangedEventArgs.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ArglessEventHandlerProxy.cs
- KeyNotFoundException.cs
- Range.cs
- ComContractElementCollection.cs
- UnauthorizedWebPart.cs
- ToolBarButtonDesigner.cs
- ControlIdConverter.cs
- ExecutionEngineException.cs
- LocalizableResourceBuilder.cs
- DBConnectionString.cs
- DictionaryCustomTypeDescriptor.cs
- SoapReflectionImporter.cs
- AssemblyHash.cs
- DataListItemCollection.cs
- CqlLexer.cs
- ListViewItemCollectionEditor.cs
- Sorting.cs
- DataServices.cs
- InertiaTranslationBehavior.cs
- __Filters.cs
- SpellerStatusTable.cs
- CompositeFontParser.cs
- ProtocolViolationException.cs
- PageAdapter.cs
- AdapterDictionary.cs
- Blend.cs
- XmlObjectSerializerWriteContextComplex.cs
- BamlCollectionHolder.cs
- LineBreakRecord.cs
- MetadataWorkspace.cs
- CommonObjectSecurity.cs
- JavaScriptString.cs
- AnonymousIdentificationModule.cs
- ValidatedMobileControlConverter.cs
- Hash.cs
- UnitySerializationHolder.cs
- WebProxyScriptElement.cs
- ModifiableIteratorCollection.cs
- XPathSelfQuery.cs
- GeneratedCodeAttribute.cs
- TreeIterator.cs
- QuadraticEase.cs
- ValidationErrorEventArgs.cs
- IntersectQueryOperator.cs
- DataGridPageChangedEventArgs.cs
- RectAnimation.cs
- CollectionBuilder.cs
- FontConverter.cs
- SessionEndingEventArgs.cs
- X509ChainPolicy.cs
- Util.cs
- WindowsFormsLinkLabel.cs
- OracleColumn.cs
- EntitySetDataBindingList.cs
- EmbeddedMailObject.cs
- GlyphRunDrawing.cs
- Helpers.cs
- JapaneseLunisolarCalendar.cs
- AsyncResult.cs