DataServiceEntityAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / Binding / DataServiceEntityAttribute.cs / 1305376 / DataServiceEntityAttribute.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
//      EntitySetAttribute class
//  
// 
//---------------------------------------------------------------------
namespace System.Data.Services.Common 
{
    /// 
    /// This attribute allows users to specify an entity set name with a client type.
    ///  
    /// 
    /// This attribute is generated only when there is one entity set associated with the type. 
    /// When there are more than one entity set associated with the type, then the entity set 
    /// name can be passed in through the EntitySetNameResolver event.
    ///  
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class EntitySetAttribute : System.Attribute
    {
        ///  
        /// The entity set name.
        ///  
        private readonly string entitySet; 

        ///  
        /// Construct a EntitySetAttribute
        /// 
        /// The entity set name.
        public EntitySetAttribute(string entitySet) 
        {
            this.entitySet = entitySet; 
        } 

        ///  
        /// The entity set name.
        /// 
        public string EntitySet
        { 
            get
            { 
                return this.entitySet; 
            }
        } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
//      EntitySetAttribute class
//  
// 
//---------------------------------------------------------------------
namespace System.Data.Services.Common 
{
    /// 
    /// This attribute allows users to specify an entity set name with a client type.
    ///  
    /// 
    /// This attribute is generated only when there is one entity set associated with the type. 
    /// When there are more than one entity set associated with the type, then the entity set 
    /// name can be passed in through the EntitySetNameResolver event.
    ///  
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class EntitySetAttribute : System.Attribute
    {
        ///  
        /// The entity set name.
        ///  
        private readonly string entitySet; 

        ///  
        /// Construct a EntitySetAttribute
        /// 
        /// The entity set name.
        public EntitySetAttribute(string entitySet) 
        {
            this.entitySet = entitySet; 
        } 

        ///  
        /// The entity set name.
        /// 
        public string EntitySet
        { 
            get
            { 
                return this.entitySet; 
            }
        } 
    }
}

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