namespace HaloPixelToolBox.Core.Models.Notifications;
public sealed record MessageNotificationOptions(bool WeChat = false, bool QQ = false, bool WeCom = false)
{
public bool AnyEnabled => WeChat || QQ || WeCom;
public bool IsEnabled(MessageNotificationSource source) => source switch
{
MessageNotificationSource.WeChat => WeChat,
MessageNotificationSource.QQ => QQ,
MessageNotificationSource.WeCom => WeCom,
_ => false
};
}
namespace HaloPixelToolBox.Core.Models.Notifications;
public sealed record MessageNotificationOptions(bool WeChat = false, bool QQ = false, bool WeCom = false)
{
public bool AnyEnabled => WeChat || QQ || WeCom;
public bool IsEnabled(MessageNotificationSource source) => source switch
{
MessageNotificationSource.WeChat => WeChat,
MessageNotificationSource.QQ => QQ,
MessageNotificationSource.WeCom => WeCom,
_ => false
};
}