QueryExecutionOption.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 / Core / System / Linq / Parallel / QueryOperators / Options / QueryExecutionOption.cs / 1305376 / QueryExecutionOption.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
// 
// QueryExecutionOption.cs 
//
// [....] 
//
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

using System.Collections.Generic; 
using System.Threading;
namespace System.Linq.Parallel 
{ 
    /// 
    /// Represents operators that set various query execution options. 
    /// 
    /// 
    internal class QueryExecutionOption : QueryOperator
    { 
        private QueryOperator m_child;
        private OrdinalIndexState m_indexState; 
 
        internal QueryExecutionOption(QueryOperator source, QuerySettings settings)
            : base(source.OutputOrdered, settings.Merge(source.SpecifiedQuerySettings)) 
        {
            m_child = source;
            m_indexState = m_child.OrdinalIndexState;
        } 

        internal override QueryResults Open(QuerySettings settings, bool preferStriping) 
        { 
            return m_child.Open(settings, preferStriping);
        } 

        //----------------------------------------------------------------------------------------
        // Returns an enumerable that represents the query executing sequentially.
        // 

        internal override IEnumerable AsSequentialQuery(CancellationToken token) 
        { 
            return m_child.AsSequentialQuery(token);
        } 

        internal override OrdinalIndexState OrdinalIndexState
        {
            get { return m_indexState; } 
        }
 
 
        //---------------------------------------------------------------------------------------
        // Whether this operator performs a premature merge. 
        //

        internal override bool LimitsParallelism
        { 
            get { return m_child.LimitsParallelism; }
        } 
    } 
}

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