init
This commit is contained in:
37
Framework/Entities/EntityHandlerAttribute.cs
Normal file
37
Framework/Entities/EntityHandlerAttribute.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
|
||||
namespace Kreta.Framework.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Az attribútum egy adott entitáshoz tartozó esemény kezelő osztályt azonosít.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Az attribútumot olyan osztályra kell tenni, amely megvalósítja az
|
||||
/// <see cref="IEntityHandler"/> felületet.
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
|
||||
public sealed class EntityHandlerAttribute : Attribute
|
||||
{
|
||||
private string m_EntityName;
|
||||
|
||||
/// <summary>
|
||||
/// Az attribútum konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="entityName">Az entitás neve, amihez a kezelő tartozik</param>
|
||||
public EntityHandlerAttribute(string entityName)
|
||||
{
|
||||
m_EntityName = entityName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Az entitás neve, amihez a kezelő tartozik.
|
||||
/// </summary>
|
||||
public string EntityName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_EntityName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user