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); }
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; } }