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.
31 lines
965 B
31 lines
965 B
using System.Threading.Tasks; |
|
using Avalonia; |
|
using Avalonia.Controls.Notifications; |
|
using StabilityMatrix.Avalonia.Services; |
|
using StabilityMatrix.Core.Models; |
|
|
|
namespace StabilityMatrix.Avalonia.DesignData; |
|
|
|
public class MockNotificationService : INotificationService |
|
{ |
|
public void Initialize(Visual? visual, |
|
NotificationPosition position = NotificationPosition.BottomRight, int maxItems = 3) |
|
{ |
|
} |
|
|
|
public void Show(INotification notification) |
|
{ |
|
} |
|
|
|
public Task<TaskResult<T>> TryAsync<T>(Task<T> task, string title = "Error", string? message = null, |
|
NotificationType appearance = NotificationType.Error) |
|
{ |
|
return Task.FromResult(new TaskResult<T>(default!)); |
|
} |
|
|
|
public Task<TaskResult<bool>> TryAsync(Task task, string title = "Error", string? message = null, |
|
NotificationType appearance = NotificationType.Error) |
|
{ |
|
return Task.FromResult(new TaskResult<bool>(true)); |
|
} |
|
}
|
|
|