Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
701 B

using System;
using Avalonia.Controls.Notifications;
using StabilityMatrix.Core.Models.Settings;
namespace StabilityMatrix.Avalonia.Extensions;
public static class NotificationLevelExtensions
{
public static NotificationType ToNotificationType(this NotificationLevel level)
{
return level switch
{
NotificationLevel.Information => NotificationType.Information,
NotificationLevel.Success => NotificationType.Success,
NotificationLevel.Warning => NotificationType.Warning,
NotificationLevel.Error => NotificationType.Error,
_ => throw new ArgumentOutOfRangeException(nameof(level), level, null)
};
}
}