ExpandedWrapper.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 / Orcas / SP / ndp / fx / src / DataWeb / Server / System / Data / Services / Internal / ExpandedWrapper.cs / 1 / ExpandedWrapper.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
//      Provides a base class implementing IExpandedResult over
//      projections. 
//  
//
// @owner  [....] 
//---------------------------------------------------------------------

namespace System.Data.Services.Internal
{ 
    using System;
 
    /// Provides a base class implementing IExpandedResult over projections. 
    /// Type of element whose properties are expanded.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public abstract class ExpandedWrapper: IExpandedResult
    {
        #region Fields. 

        /// Text description of properties, in comma-separated format. 
        private string description; 

        /// Element whose properties are being expanded. 
        private TExpandedElement expandedElement;

        /// Parsed property names.
        private string[] propertyNames; 

        #endregion Fields. 
 
        #region Public properties.
 
        /// Text description of properties, in comma-separated format.
        public string Description
        {
            get 
            {
                return this.description; 
            } 

            set 
            {
                this.description = WebUtil.CheckArgumentNull(value, "value");
                this.propertyNames = WebUtil.StringToSimpleArray(this.description);
                int expectedLength = this.GetType().GetGenericArguments().Length - 1; 
                if (this.propertyNames.Length != expectedLength)
                { 
                    throw new InvalidOperationException( 
                        Strings.BasicExpandProvider_DescriptionInitializerCountMismatch(value, expectedLength));
                } 
            }
        }

        /// Element whose properties are being expanded. 
        public TExpandedElement ExpandedElement
        { 
            get { return this.expandedElement; } 
            set { this.expandedElement = value; }
        } 

        /// The element with expanded properties.
        object IExpandedResult.ExpandedElement
        { 
            get { return this.ExpandedElement; }
        } 
 
        #endregion Public properties.
 
        #region Methods.

        /// Gets the value for named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        ///  
        /// If the element returned in turn has properties which are expanded out-of-band 
        /// of the object model, then the result will also be of type ,
        /// and the value will be available through . 
        /// 
        public object GetExpandedPropertyValue(string name)
        {
            if (name == null) 
            {
                throw new ArgumentNullException("name"); 
            } 

            if (this.propertyNames == null) 
            {
                throw new InvalidOperationException(Strings.BasicExpandProvider_ExpandedPropertiesNotInitialized);
            }
 
            int nameIndex = -1;
            for (int i = 0; i < this.propertyNames.Length; i++) 
            { 
                if (this.propertyNames[i] == name)
                { 
                    nameIndex = i;
                    break;
                }
            } 

            return this.InternalGetExpandedPropertyValue(nameIndex); 
        } 

        /// Gets the value for the property for the result. 
        /// Index of property for which to get enumerable results.
        /// The value for the property of the result.
        protected abstract object InternalGetExpandedPropertyValue(int nameIndex);
 
        #endregion Methods.
    } 
 
    #region ExpandedWrapper types with numbered properties.
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper
    {
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; }

        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            throw Error.NotSupported(); 
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            throw Error.NotSupported();
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper
    {
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; }

        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2;
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; }

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6;
            throw Error.NotSupported();
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty6 ProjectedProperty6 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6; 
            if (nameIndex == 7) return this.ProjectedProperty7;
            throw Error.NotSupported(); 
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; }

        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; }

        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7;
            if (nameIndex == 8) return this.ProjectedProperty8; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; }

        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; }

        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty9 ProjectedProperty9 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2;
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5; 
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7; 
            if (nameIndex == 8) return this.ProjectedProperty8; 
            if (nameIndex == 9) return this.ProjectedProperty9;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty6 ProjectedProperty6 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty8 ProjectedProperty8 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty9 ProjectedProperty9 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty10 ProjectedProperty10 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6; 
            if (nameIndex == 7) return this.ProjectedProperty7;
            if (nameIndex == 8) return this.ProjectedProperty8; 
            if (nameIndex == 9) return this.ProjectedProperty9; 
            if (nameIndex == 10) return this.ProjectedProperty10;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; }

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty7 ProjectedProperty7 { get; set; }

        /// Gets or sets a projected property.
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty9 ProjectedProperty9 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty10 ProjectedProperty10 { get; set; }

        /// Gets or sets a projected property.
        public TProperty11 ProjectedProperty11 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5; 
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7; 
            if (nameIndex == 8) return this.ProjectedProperty8;
            if (nameIndex == 9) return this.ProjectedProperty9;
            if (nameIndex == 10) return this.ProjectedProperty10;
            if (nameIndex == 11) return this.ProjectedProperty11; 
            throw Error.NotSupported();
        } 
    } 

    #endregion ExpandedWrapper types with numbered properties. 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
//      Provides a base class implementing IExpandedResult over
//      projections. 
//  
//
// @owner  [....] 
//---------------------------------------------------------------------

namespace System.Data.Services.Internal
{ 
    using System;
 
    /// Provides a base class implementing IExpandedResult over projections. 
    /// Type of element whose properties are expanded.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public abstract class ExpandedWrapper: IExpandedResult
    {
        #region Fields. 

        /// Text description of properties, in comma-separated format. 
        private string description; 

        /// Element whose properties are being expanded. 
        private TExpandedElement expandedElement;

        /// Parsed property names.
        private string[] propertyNames; 

        #endregion Fields. 
 
        #region Public properties.
 
        /// Text description of properties, in comma-separated format.
        public string Description
        {
            get 
            {
                return this.description; 
            } 

            set 
            {
                this.description = WebUtil.CheckArgumentNull(value, "value");
                this.propertyNames = WebUtil.StringToSimpleArray(this.description);
                int expectedLength = this.GetType().GetGenericArguments().Length - 1; 
                if (this.propertyNames.Length != expectedLength)
                { 
                    throw new InvalidOperationException( 
                        Strings.BasicExpandProvider_DescriptionInitializerCountMismatch(value, expectedLength));
                } 
            }
        }

        /// Element whose properties are being expanded. 
        public TExpandedElement ExpandedElement
        { 
            get { return this.expandedElement; } 
            set { this.expandedElement = value; }
        } 

        /// The element with expanded properties.
        object IExpandedResult.ExpandedElement
        { 
            get { return this.ExpandedElement; }
        } 
 
        #endregion Public properties.
 
        #region Methods.

        /// Gets the value for named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        ///  
        /// If the element returned in turn has properties which are expanded out-of-band 
        /// of the object model, then the result will also be of type ,
        /// and the value will be available through . 
        /// 
        public object GetExpandedPropertyValue(string name)
        {
            if (name == null) 
            {
                throw new ArgumentNullException("name"); 
            } 

            if (this.propertyNames == null) 
            {
                throw new InvalidOperationException(Strings.BasicExpandProvider_ExpandedPropertiesNotInitialized);
            }
 
            int nameIndex = -1;
            for (int i = 0; i < this.propertyNames.Length; i++) 
            { 
                if (this.propertyNames[i] == name)
                { 
                    nameIndex = i;
                    break;
                }
            } 

            return this.InternalGetExpandedPropertyValue(nameIndex); 
        } 

        /// Gets the value for the property for the result. 
        /// Index of property for which to get enumerable results.
        /// The value for the property of the result.
        protected abstract object InternalGetExpandedPropertyValue(int nameIndex);
 
        #endregion Methods.
    } 
 
    #region ExpandedWrapper types with numbered properties.
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper
    {
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; }

        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            throw Error.NotSupported(); 
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            throw Error.NotSupported();
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper
    {
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; }

        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2;
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; }

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6;
            throw Error.NotSupported();
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty6 ProjectedProperty6 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6; 
            if (nameIndex == 7) return this.ProjectedProperty7;
            throw Error.NotSupported(); 
        } 
    }
 
    /// Provides a wrapper over an element expanded with projections.
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; }

        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; }

        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7;
            if (nameIndex == 8) return this.ProjectedProperty8; 
            throw Error.NotSupported();
        } 
    } 

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] 
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; }

        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; }

        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; }

        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty9 ProjectedProperty9 { get; set; }

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        { 
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1; 
            if (nameIndex == 2) return this.ProjectedProperty2;
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5; 
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7; 
            if (nameIndex == 8) return this.ProjectedProperty8; 
            if (nameIndex == 9) return this.ProjectedProperty9;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code.
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")] 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper
    { 
        /// Gets or sets a projected property.
        public TProperty0 ProjectedProperty0 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty1 ProjectedProperty1 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty3 ProjectedProperty3 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty4 ProjectedProperty4 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty6 ProjectedProperty6 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty7 ProjectedProperty7 { get; set; } 

        /// Gets or sets a projected property.
        public TProperty8 ProjectedProperty8 { get; set; }
 
        /// Gets or sets a projected property.
        public TProperty9 ProjectedProperty9 { get; set; } 
 
        /// Gets or sets a projected property.
        public TProperty10 ProjectedProperty10 { get; set; } 

        /// Gets the value for the named property for the result.
        /// Name of property for which to get enumerable results.
        /// The value for the named property of the result. 
        protected override object InternalGetExpandedPropertyValue(int nameIndex)
        { 
            if (nameIndex == 0) return this.ProjectedProperty0; 
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4;
            if (nameIndex == 5) return this.ProjectedProperty5;
            if (nameIndex == 6) return this.ProjectedProperty6; 
            if (nameIndex == 7) return this.ProjectedProperty7;
            if (nameIndex == 8) return this.ProjectedProperty8; 
            if (nameIndex == 9) return this.ProjectedProperty9; 
            if (nameIndex == 10) return this.ProjectedProperty10;
            throw Error.NotSupported(); 
        }
    }

    /// Provides a wrapper over an element expanded with projections. 
    /// Type of expanded element.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property.
    /// Type of projected property. 
    /// Type of projected property. 
    /// Type of projected property.
    /// This class supports the ADO.NET Data Services infrastructure and is not meant to be used directly from your code. 
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903", Justification = "Type is already under System namespace.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005", Justification = "More than two parameter types used for wide projections.")]
    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public sealed class ExpandedWrapper : ExpandedWrapper 
    {
        /// Gets or sets a projected property. 
        public TProperty0 ProjectedProperty0 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty1 ProjectedProperty1 { get; set; }

        /// Gets or sets a projected property.
        public TProperty2 ProjectedProperty2 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty3 ProjectedProperty3 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty4 ProjectedProperty4 { get; set; }

        /// Gets or sets a projected property.
        public TProperty5 ProjectedProperty5 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty6 ProjectedProperty6 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty7 ProjectedProperty7 { get; set; }

        /// Gets or sets a projected property.
        public TProperty8 ProjectedProperty8 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty9 ProjectedProperty9 { get; set; } 

        /// Gets or sets a projected property. 
        public TProperty10 ProjectedProperty10 { get; set; }

        /// Gets or sets a projected property.
        public TProperty11 ProjectedProperty11 { get; set; } 

        /// Gets the value for the named property for the result. 
        /// Name of property for which to get enumerable results. 
        /// The value for the named property of the result.
        protected override object InternalGetExpandedPropertyValue(int nameIndex) 
        {
            if (nameIndex == 0) return this.ProjectedProperty0;
            if (nameIndex == 1) return this.ProjectedProperty1;
            if (nameIndex == 2) return this.ProjectedProperty2; 
            if (nameIndex == 3) return this.ProjectedProperty3;
            if (nameIndex == 4) return this.ProjectedProperty4; 
            if (nameIndex == 5) return this.ProjectedProperty5; 
            if (nameIndex == 6) return this.ProjectedProperty6;
            if (nameIndex == 7) return this.ProjectedProperty7; 
            if (nameIndex == 8) return this.ProjectedProperty8;
            if (nameIndex == 9) return this.ProjectedProperty9;
            if (nameIndex == 10) return this.ProjectedProperty10;
            if (nameIndex == 11) return this.ProjectedProperty11; 
            throw Error.NotSupported();
        } 
    } 

    #endregion ExpandedWrapper types with numbered properties. 
}

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