//---------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner Microsoft
// @backupOwner Microsoft
//---------------------------------------------------------------------
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,
}
}