public override string Check(int tenantId) { try { log.Debug("CheckNotifyState"); using (var notifyServiceClient = new NotifyServiceClient()) { var userGuid = new Guid(fakeUserId); var user = CoreContext.UserManager.GetUsers(userGuid); notifyServiceClient.SendNotifyMessage(new NotifyMessage { To = user.UserName, Subject = "Subject", ContentType = "ContentType", Content = "Content", Sender = Constants.NotifyMessengerSenderSysName, CreationDate = DateTime.UtcNow }); } log.Debug("Notify is OK!"); return(string.Empty); } catch (Exception ex) { log.ErrorFormat("Notify is failed! {0} {1} {2}", ex.Message, ex.StackTrace, ex.InnerException != null ? ex.InnerException.Message : string.Empty); return(HealthCheckResource.ServiceCheckFailed); } }
public NoticeSendResult Send(NotifyMessage m) { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return NoticeSendResult.OK; }
public NoticeSendResult Send(NotifyMessage m) { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return(NoticeSendResult.OK); }
private static void SendNotification(string method, int tenantId, params object[] args) { try { using (var notifyClient = new NotifyServiceClient()) { notifyClient.InvokeSendMethod(NotifyService, method, tenantId, args); } } catch (Exception error) { LogManager.GetLogger("ASC.Backup").Warn("Error while sending notification", error); } }
private void SendStorageEncryptionNotification(string method, int tenantId) { try { using (var notifyClient = new NotifyServiceClient()) { notifyClient.InvokeSendMethod(NotifyService, method, tenantId, ServerRootPath); } } catch (Exception error) { LogManager.GetLogger("ASC").Warn("Error while sending notification", error); } }
private void SendStorageEncryptionNotification(string method, int tenantId) { var notifyInvoke = new NotifyInvoke() { Service = NotifyService, Method = method, Tenant = tenantId }; notifyInvoke.Parameters.Add(ServerRootPath); try { NotifyServiceClient.InvokeSendMethod(notifyInvoke); } catch (Exception error) { Log.Warn("Error while sending notification", error); } }
public NoticeSendResult Send(NotifyMessage m) { try { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return(NoticeSendResult.OK); } catch (ReflectionTypeLoadException) { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return(NoticeSendResult.OK); } }
public NoticeSendResult Send(NotifyMessage m) { try { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return NoticeSendResult.OK; } catch (ReflectionTypeLoadException) { using (var notifyClient = new NotifyServiceClient()) { notifyClient.SendNotifyMessage(m); } return NoticeSendResult.OK; } }
public NotifyHelper(IOptionsMonitor <ILog> option, NotifyServiceClient notifyServiceClient) { NotifyServiceClient = notifyServiceClient; Log = option.CurrentValue; }
public NotifyServiceSender(ICacheNotify <NotifyMessage> cacheNotify, ICacheNotify <NotifyInvoke> notifyInvoke) { NotifyServiceClient = new NotifyServiceClient(cacheNotify, notifyInvoke); }
public NotifyServiceSender(ICacheNotify <NotifyMessage> cacheNotify) { NotifyServiceClient = new NotifyServiceClient(cacheNotify); }
public NotifyServiceSender() { NotifyServiceClient = new NotifyServiceClient(); }