64 lines
2.2 KiB
C#
64 lines
2.2 KiB
C#
using System;
|
|
|
|
namespace Kreta.Framework.Entities
|
|
{
|
|
/// <summary>
|
|
/// Entitás DictionaryItem tulajdonságait leíró attribútum.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = true)]
|
|
public sealed class EntityDictionaryItemPropertyAttribute : Attribute
|
|
{
|
|
private string m_DictionaryItemFieldName;
|
|
private string m_DictionaryItemClassName;
|
|
private Type m_DictionaryItemClassType;
|
|
|
|
/// <summary>
|
|
/// Az attributum konstruktora
|
|
/// </summary>
|
|
/// <param name="dictionaryItemFieldName">A dictitem mező neve</param>
|
|
/// <param name="dictionaryItemClassName">A dictitem osztály neve</param>
|
|
/// <param name="dictionaryItemClassType">A dictitem osztály típusa</param>
|
|
public EntityDictionaryItemPropertyAttribute(string dictionaryItemFieldName, string dictionaryItemClassName, Type dictionaryItemClassType)
|
|
{
|
|
m_DictionaryItemClassName = dictionaryItemClassName;
|
|
m_DictionaryItemFieldName = dictionaryItemFieldName;
|
|
m_DictionaryItemClassType = dictionaryItemClassType;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Az attributum konstruktora
|
|
/// </summary>
|
|
/// <param name="dictionaryItemFieldName">A dictitem mező neve</param>
|
|
/// <param name="dictionaryItemClassName">A dictitem osztály neve</param>
|
|
public EntityDictionaryItemPropertyAttribute(string dictionaryItemFieldName, string dictionaryItemClassName)
|
|
{
|
|
m_DictionaryItemClassName = dictionaryItemClassName;
|
|
m_DictionaryItemFieldName = dictionaryItemFieldName;
|
|
m_DictionaryItemClassType = null;
|
|
}
|
|
|
|
public string DictionaryItemFieldName
|
|
{
|
|
get
|
|
{
|
|
return m_DictionaryItemFieldName;
|
|
}
|
|
}
|
|
|
|
public string DictionaryItemClassName
|
|
{
|
|
get
|
|
{
|
|
return m_DictionaryItemClassName;
|
|
}
|
|
}
|
|
|
|
public Type DictionaryItemClassType
|
|
{
|
|
get
|
|
{
|
|
return m_DictionaryItemClassType;
|
|
}
|
|
}
|
|
}
|
|
}
|