Example #1
0
        public virtual string[] GetSubscriptionMethod(INotifyAction action, IRecipient recipient)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }
            if (recipient == null)
            {
                throw new ArgumentNullException("recipient");
            }

            var senders = subscriptionProvider.GetSubscriptionMethod(action, recipient);

            if (senders == null || senders.Length == 0)
            {
                var parents = WalkUp(recipient);
                foreach (var parent in parents)
                {
                    senders = subscriptionProvider.GetSubscriptionMethod(action, parent);
                    if (senders != null && senders.Length != 0)
                    {
                        break;
                    }
                }
            }

            return(senders != null && 0 < senders.Length ? senders : defaultSenderMethods);
        }
 public string[] GetSubscriptionMethod(INotifyAction action, IRecipient recipient)
 {
     return(provider.GetSubscriptionMethod(GetAdminAction(action), recipient));
 }