internal async Task InternalOpen(NotificationConfig config) { if (OnNoticing != null) { if (string.IsNullOrWhiteSpace(config.Key)) { config.Key = Guid.NewGuid().ToString(); } await OnNoticing.Invoke(config); } }
/// <summary> /// Open a notification box /// </summary> /// <param name="config"></param> public async Task Open([NotNull] NotificationConfig config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } if (OnNoticing != null) { await OnNoticing.Invoke(config); } }
/// <summary> /// Open a notification box /// </summary> /// <param name="config"></param> public async Task Open([NotNull] NotificationConfig config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } var task = OnNoticing?.Invoke(config); if (task != null) { await task; } }