61 lines
No EOL
1.3 KiB
C#
61 lines
No EOL
1.3 KiB
C#
using JD.Kernel.StaticHelpers;
|
|
using JD.TeaBoxAddinSystem.Addins.Attributes;
|
|
|
|
namespace JD.TeaBoxAddinSystem.Addins
|
|
{
|
|
public class HandlerExtensionNode<THandler> : ExtensionNode
|
|
{
|
|
#region Variables
|
|
|
|
[NodeAttribute("action", true, "Action Id.")]
|
|
private string m_actionId;
|
|
|
|
[NodeAttribute("handler", true, "Action Handler.")]
|
|
private LazyInstanceReference<THandler> m_handler;
|
|
|
|
#endregion
|
|
|
|
#region Ctors
|
|
|
|
public HandlerExtensionNode()
|
|
{
|
|
}
|
|
|
|
public HandlerExtensionNode(string actionId, LazyInstanceReference<THandler> handler)
|
|
{
|
|
Throw.IfEmpty(actionId, "actionId");
|
|
Throw.IfNull(handler, "handler");
|
|
|
|
m_actionId = actionId;
|
|
m_handler = handler;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
/// <summary>
|
|
/// Action Id.
|
|
/// </summary>
|
|
public string ActionId
|
|
{
|
|
get
|
|
{
|
|
return m_actionId;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handler.
|
|
/// </summary>
|
|
public LazyInstanceReference<THandler> Handler
|
|
{
|
|
get
|
|
{
|
|
return m_handler;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |