ObjectMemberMapping.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 / DataEntity / System / Data / Mapping / ObjectMemberMapping.cs / 1305376 / ObjectMemberMapping.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// 
// @owner       [....]
// @backupOwner [....] 
//--------------------------------------------------------------------- 

using System; 
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Data.Metadata.Edm; 

namespace System.Data.Mapping { 
    ///  
    /// Mapping metadata for all OC member maps.
    ///  
    internal abstract class ObjectMemberMapping
    {
        #region Constructors
        ///  
        /// Constrcut a new member mapping metadata object
        ///  
        ///  
        /// 
        protected ObjectMemberMapping(EdmMember edmMember, EdmMember clrMember) 
        {
            System.Diagnostics.Debug.Assert(edmMember.BuiltInTypeKind == clrMember.BuiltInTypeKind, "BuiltInTypeKind must be the same");
            this.m_edmMember = edmMember;
            this.m_clrMember = clrMember; 
        }
        #endregion 
 
        #region Fields
        #region Internal 
        EdmMember m_edmMember;  //EdmMember metadata representing the Cdm member for which the mapping is specified
        EdmMember m_clrMember;  //EdmMember metadata representing the Clr member for which the mapping is specified
        #endregion
        #endregion 

        #region Properties 
        ///  
        /// The PropertyMetadata object that represents the Cdm member for which mapping is being specified
        ///  
        internal EdmMember EdmMember
        {
            get
            { 
                return this.m_edmMember;
            } 
        } 

        ///  
        /// The PropertyMetadata object that represents the Clr member for which mapping is being specified
        /// 
        internal EdmMember ClrMember
        { 
            get
            { 
                return this.m_clrMember; 
            }
        } 

        /// 
        /// Returns the member mapping kind
        ///  
        internal abstract MemberMappingKind MemberMappingKind { get; }
        #endregion 
    } 

    ///  
    /// Represents the various kind of member mapping
    /// 
    internal enum MemberMappingKind
    { 
        ScalarPropertyMapping = 0,
 
        NavigationPropertyMapping = 1, 

        AssociationEndMapping =2, 

        ComplexPropertyMapping = 3,
    }
} 

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