|
using System;
using Codebasement.DomainDrivenDesign.Basement.Enums;
namespace Codebasement.DomainDrivenDesign.Basement.Attributes
{
/// <summary>
/// RelatableAttribute
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments")]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class RelatableAttribute : Attribute
{
private Type _basementObjectType;
private int _cardinality;
private CardinalityType _cardinalityType;
/// <summary>
/// Initializes a new instance of the <see cref="RelatableAttribute"/> class.
/// </summary>
public RelatableAttribute()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="RelatableAttribute"/> class.
/// </summary>
/// <param name="basementObjectType">Type of the basement object.</param>
/// <param name="cardinality">The cardinality.</param>
/// <param name="cardinalityType">Type of the cardinality.</param>
public RelatableAttribute(Type basementObjectType, int cardinality, CardinalityType cardinalityType)
{
_basementObjectType = basementObjectType;
_cardinality = cardinality;
_cardinalityType = cardinalityType;
}
/// <summary>
/// Gets or sets the type of the basement object.
/// </summary>
/// <value>The type of the basement object.</value>
public Type BasementObjectType
{
get { return _basementObjectType; }
set { _basementObjectType = value; }
}
/// <summary>
/// Gets or sets the cardinality.
/// </summary>
/// <value>The cardinality.</value>
public int Cardinality
{
get { return _cardinality; }
set { _cardinality = value; }
}
/// <summary>
/// Gets or sets the type of the cardinality.
/// </summary>
/// <value>The type of the cardinality.</value>
public CardinalityType CardinalityType
{
get { return _cardinalityType; }
set { _cardinalityType = value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.