QilUnary.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / QIL / QilUnary.cs / 1 / QilUnary.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
//-----------------------------------------------------------------------------
using System; 
using System.Collections.Generic; 
using System.Diagnostics;
 
namespace System.Xml.Xsl.Qil {

    /// 
    /// View over a Qil operator having one child. 
    /// 
    ///  
    /// Don't construct QIL nodes directly; instead, use the QilFactory. 
    /// 
    internal class QilUnary : QilNode { 
        private QilNode child;


        //----------------------------------------------- 
        // Constructor
        //----------------------------------------------- 
 
        /// 
        /// Construct a new node 
        /// 
        public QilUnary(QilNodeType nodeType, QilNode child) : base(nodeType) {
            this.child = child;
        } 

 
        //----------------------------------------------- 
        // 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.child; } 
            set { if (index != 0) throw new IndexOutOfRangeException(); this.child = value; }
        } 


        //-----------------------------------------------
        // QilUnary methods 
        //-----------------------------------------------
 
        public QilNode Child { 
            get { return this.child; }
            set { this.child = value; } 
        }
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
//-----------------------------------------------------------------------------
using System; 
using System.Collections.Generic; 
using System.Diagnostics;
 
namespace System.Xml.Xsl.Qil {

    /// 
    /// View over a Qil operator having one child. 
    /// 
    ///  
    /// Don't construct QIL nodes directly; instead, use the QilFactory. 
    /// 
    internal class QilUnary : QilNode { 
        private QilNode child;


        //----------------------------------------------- 
        // Constructor
        //----------------------------------------------- 
 
        /// 
        /// Construct a new node 
        /// 
        public QilUnary(QilNodeType nodeType, QilNode child) : base(nodeType) {
            this.child = child;
        } 

 
        //----------------------------------------------- 
        // 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.child; } 
            set { if (index != 0) throw new IndexOutOfRangeException(); this.child = value; }
        } 


        //-----------------------------------------------
        // QilUnary methods 
        //-----------------------------------------------
 
        public QilNode Child { 
            get { return this.child; }
            set { this.child = 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