QilIterator.cs source code in C# .NET

Source code for the .NET framework in C#

                        

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 / QIL / QilIterator.cs / 1 / QilIterator.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
//-----------------------------------------------------------------------------
using System; 
using System.Diagnostics; 

namespace System.Xml.Xsl.Qil { 

    /// 
    /// View over a Qil iterator node (For or Let).
    ///  
    internal class QilIterator : QilReference {
        private QilNode binding; 
 
        //-----------------------------------------------
        // Constructor 
        //-----------------------------------------------

        /// 
        /// Construct an iterator 
        /// 
        public QilIterator(QilNodeType nodeType, QilNode binding) : base(nodeType) { 
            Binding = binding; 
        }
 

        //-----------------------------------------------
        // IList methods -- override
        //----------------------------------------------- 

        public override int Count { 
            get { return 1; } 
        }
 
        public override QilNode this[int index] {
            get { if (index != 0) throw new IndexOutOfRangeException(); return this.binding; }
            set { if (index != 0) throw new IndexOutOfRangeException(); this.binding = value; }
        } 

 
        //----------------------------------------------- 
        // QilIterator methods
        //----------------------------------------------- 

        /// 
        /// Expression which is bound to the iterator.
        ///  
        public QilNode Binding {
            get { return this.binding; } 
            set { this.binding = value; } 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
//-----------------------------------------------------------------------------
using System; 
using System.Diagnostics; 

namespace System.Xml.Xsl.Qil { 

    /// 
    /// View over a Qil iterator node (For or Let).
    ///  
    internal class QilIterator : QilReference {
        private QilNode binding; 
 
        //-----------------------------------------------
        // Constructor 
        //-----------------------------------------------

        /// 
        /// Construct an iterator 
        /// 
        public QilIterator(QilNodeType nodeType, QilNode binding) : base(nodeType) { 
            Binding = binding; 
        }
 

        //-----------------------------------------------
        // IList methods -- override
        //----------------------------------------------- 

        public override int Count { 
            get { return 1; } 
        }
 
        public override QilNode this[int index] {
            get { if (index != 0) throw new IndexOutOfRangeException(); return this.binding; }
            set { if (index != 0) throw new IndexOutOfRangeException(); this.binding = value; }
        } 

 
        //----------------------------------------------- 
        // QilIterator methods
        //----------------------------------------------- 

        /// 
        /// Expression which is bound to the iterator.
        ///  
        public QilNode Binding {
            get { return this.binding; } 
            set { this.binding = value; } 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK