ExpandSegmentCollection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / ExpandSegmentCollection.cs / 1407647 / ExpandSegmentCollection.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
//      Provides a description of a path in an $expand query option
//      for a WCF Data Service. 
//  
//
// @owner  [....] 
//---------------------------------------------------------------------

namespace System.Data.Services
{ 
    using System.Collections.Generic;
 
    ///  
    /// Provides a description of a path in an $expand query option
    /// for a WCF Data Service. 
    /// 
    public class ExpandSegmentCollection : List
    {
        /// Initializes a new  instance. 
        public ExpandSegmentCollection()
        { 
        } 

        /// Initializes a new  instance. 
        /// Initial capacity.
        public ExpandSegmentCollection(int capacity) : base(capacity)
        {
        } 

        /// Whether this path has any filters. 
        public bool HasFilter 
        {
            get 
            {
                foreach (ExpandSegment segment in this)
                {
                    if (segment.HasFilter) 
                    {
                        return true; 
                    } 
                }
 
                return false;
            }
        }
    } 
}

// 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