2022-02-14 09:05:05 +00:00
|
|
|
using CacheNotifyAction = ASC.Common.Caching.CacheNotifyAction;
|
2022-02-03 14:30:13 +00:00
|
|
|
|
2022-02-15 11:52:43 +00:00
|
|
|
namespace ASC.Core.Notify;
|
|
|
|
|
|
|
|
[Scope]
|
|
|
|
public class NotifyServiceClient : INotifyService
|
2020-10-19 15:53:15 +00:00
|
|
|
{
|
2022-02-15 11:52:43 +00:00
|
|
|
private readonly ICacheNotify<NotifyMessage> _cacheNotify;
|
|
|
|
private readonly ICacheNotify<NotifyInvoke> _notifyInvoke;
|
|
|
|
public NotifyServiceClient(ICacheNotify<NotifyMessage> cacheNotify, ICacheNotify<NotifyInvoke> notifyInvoke)
|
2019-08-01 08:47:15 +00:00
|
|
|
{
|
2022-02-15 11:52:43 +00:00
|
|
|
_cacheNotify = cacheNotify;
|
|
|
|
_notifyInvoke = notifyInvoke;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void SendNotifyMessage(NotifyMessage m)
|
|
|
|
{
|
|
|
|
_cacheNotify.Publish(m, CacheNotifyAction.InsertOrUpdate);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void InvokeSendMethod(NotifyInvoke notifyInvoke)
|
|
|
|
{
|
|
|
|
_notifyInvoke.Publish(notifyInvoke, CacheNotifyAction.InsertOrUpdate);
|
|
|
|
}
|
2019-05-15 14:56:09 +00:00
|
|
|
}
|