using System;
using System.Collections.Generic;
namespace Model
{
///
/// 搭配MessageComponent用来分发消息
///
public class MessageHandlerAttribute : Attribute
{
public HashSet AppTypes { get; private set; } = new HashSet();
public MessageHandlerAttribute(params string[] appTypes)
{
foreach (string appType in appTypes)
{
this.AppTypes.Add(appType);
}
}
public bool Contains(string appType)
{
return this.AppTypes.Contains(appType);
}
}
}