public void SendNoticeAsync(INotifyAction action, string objectID, SendNoticeCallback sendCallback, params ITagValue[] args) { var subscriptionSource = notifySource.GetSubscriptionProvider(); var recipients = subscriptionSource.GetRecipients(action, objectID); SendNoticeToAsync(action, objectID, recipients, null, sendCallback, false, args); }
public static void SendNoticeAsync(string AuthorID, INotifyAction action, string objectID, SendNoticeCallback sendCallback, params ITagValue[] args) { InitiatorInterceptor initatorInterceptor = new InitiatorInterceptor(new DirectRecipient(AuthorID, "")); try { NotifyClient.AddInterceptor(initatorInterceptor); NotifyClient.SendNoticeAsync(action, objectID, sendCallback, args); } finally { NotifyClient.RemoveInterceptor(initatorInterceptor.Name); } }
public void SendNoticeAsync(INotifyAction action, string objectID, IRecipient recipient, SendNoticeCallback sendCallback, params ITagValue[] args) { SendNoticeToAsync(action, objectID, new[] { recipient }, null, sendCallback, false, args); }
public void SendNoticeToAsync(INotifyAction action, string objectID, IRecipient[] recipients, string[] senderNames, SendNoticeCallback sendCallback, params ITagValue[] args) { SendNoticeToAsync(action, objectID, recipients, senderNames, sendCallback, false, args); }
private NotifyRequest CreateRequest(INotifyAction action, string objectID, IRecipient recipient, SendNoticeCallback sendCallback, ITagValue[] args, string[] senders, bool checkSubsciption) { if (action == null) { throw new ArgumentNullException("action"); } if (recipient == null) { throw new ArgumentNullException("recipient"); } if (sendCallback != null) { throw new NotImplementedException("sendCallback"); } var request = new NotifyRequest(notifySource, action, objectID, recipient); request.SenderNames = senders; request.IsNeedCheckSubscriptions = checkSubsciption; if (args != null) { request.Arguments.AddRange(args); } return(request); }
private void SendNoticeToAsync(INotifyAction action, string objectID, IRecipient[] recipients, string[] senderNames, SendNoticeCallback sendCallback, bool checkSubsciption, params ITagValue[] args) { if (recipients == null) { throw new ArgumentNullException("recipients"); } BeginSingleRecipientEvent("__syspreventduplicateinterceptor"); foreach (var recipient in recipients) { var r = CreateRequest(action, objectID, recipient, sendCallback, args, senderNames, checkSubsciption); SendAsync(r); } }
public void SendNoticeAsync(INotifyAction action, string objectID, SendNoticeCallback sendCallback, params ITagValue[] args) { var subscriptionSource = ProviderResolver.GetEnsure<ISubscriptionSource>(notifySource); var recipients = subscriptionSource.GetRecipients(action, objectID); SendNoticeToAsync(action, objectID, recipients, null, sendCallback, false, args); }
private NotifyRequest CreateRequest(INotifyAction action, string objectID, IRecipient recipient, SendNoticeCallback sendCallback, ITagValue[] args, string[] senders, bool checkSubsciption) { if (action == null) throw new ArgumentNullException("action"); if (recipient == null) throw new ArgumentNullException("recipient"); if (sendCallback != null) throw new NotImplementedException("sendCallback"); var request = new NotifyRequest(notifySource, action, objectID, recipient); request.SenderNames = senders; request.IsNeedCheckSubscriptions = checkSubsciption; if (args != null) request.Arguments.AddRange(args); return request; }
private void SendNoticeToAsync(INotifyAction action, string objectID, IRecipient[] recipients, string[] senderNames, SendNoticeCallback sendCallback, bool checkSubsciption, params ITagValue[] args) { if (recipients == null) throw new ArgumentNullException("recipients"); BeginSingleRecipientEvent("__syspreventduplicateinterceptor"); foreach (var recipient in recipients) { var r = CreateRequest(action, objectID, recipient, sendCallback, args, senderNames, checkSubsciption); SendAsync(r); } }