mirror of https://github.com/abpframework/abp.git
committed by
GitHub
9 changed files with 157 additions and 118 deletions
@ -1,17 +1,18 @@ |
|||
using System.Threading.Tasks; |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly |
|||
{ |
|||
public interface IUiMessageService |
|||
{ |
|||
Task InfoAsync(string message, string title = null, UiMessageOptions options = null); |
|||
Task InfoAsync(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task SuccessAsync(string message, string title = null, UiMessageOptions options = null); |
|||
Task SuccessAsync(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task WarnAsync(string message, string title = null, UiMessageOptions options = null); |
|||
Task WarnAsync(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task ErrorAsync(string message, string title = null, UiMessageOptions options = null); |
|||
Task ErrorAsync(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task<bool> ConfirmAsync(string message, string title = null, UiMessageOptions options = null); |
|||
Task<bool> ConfirmAsync(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
} |
|||
} |
|||
|
|||
@ -1,20 +0,0 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.AspNetCore.Components.WebAssembly; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.BlazoriseUI |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class UiMessageNotifierService : IScopedDependency |
|||
{ |
|||
public event EventHandler<UiMessageEventArgs> MessageReceived; |
|||
|
|||
public Task NotifyMessageReceivedAsync(UiMessageType messageType, string message, string title, UiMessageOptions options, TaskCompletionSource<bool> callback = null) |
|||
{ |
|||
MessageReceived?.Invoke(this, new UiMessageEventArgs(messageType, message, title, options, callback)); |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue