//---------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner Microsoft
// @backupOwner Microsoft
//---------------------------------------------------------------------
using System;
namespace System.Data.Objects.DataClasses
{
///
/// Attribute identifying the Ends defined for a RelationshipSet
/// Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
/// The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")]
[AttributeUsage(AttributeTargets.Property)]
public sealed class EdmRelationshipNavigationPropertyAttribute : EdmPropertyAttribute
{
private string _relationshipNamespaceName;
private string _relationshipName;
private string _targetRoleName;
///
/// Attribute identifying the Ends defined for a RelationshipSet
///
public EdmRelationshipNavigationPropertyAttribute(string relationshipNamespaceName, string relationshipName, string targetRoleName)
{
_relationshipNamespaceName = relationshipNamespaceName;
_relationshipName = relationshipName;
_targetRoleName = targetRoleName;
}
///
/// the namespace name of the relationship
///
public string RelationshipNamespaceName
{
get { return _relationshipNamespaceName; }
}
///
/// the relationship name
///
public string RelationshipName
{
get { return _relationshipName; }
}
///
/// the target role name
///
public string TargetRoleName
{
get { return _targetRoleName; }
}
}
}