public void FindExpertsToNotify()
        {
            var experts = employees.Where(e => e.Experience > 8);

            foreach (var item in experts)
            {
                notificationAction.ActOnNotification(item, notificationAction.GetType().ToString());
            }
        }
        private static NotificationActionsPart ConvertToActionsXmlPart(INotificationAction action)
        {
            var customAction           = action as CustomAction;
            var snoozeAndDismissAction = action as SnoozeAndDismissAction;

            if (customAction != null)
            {
                return(customAction.ToXmlPart());
            }

            if (snoozeAndDismissAction != null)
            {
                return(snoozeAndDismissAction.ToXmlPart());
            }

            throw new InvalidOperationException(
                      string.Format("The '{0}' action type is not supported.", action.GetType()));
        }
        private static NotificationActionsPart ConvertToActionsXmlPart(INotificationAction action)
        {
            var customAction = action as CustomAction;
            var snoozeAndDismissAction = action as SnoozeAndDismissAction;

            if (customAction != null)
            {
                return customAction.ToXmlPart();
            }

            if (snoozeAndDismissAction != null)
            {
                return snoozeAndDismissAction.ToXmlPart();
            }

            throw new InvalidOperationException(
                string.Format("The '{0}' action type is not supported.", action.GetType()));
        }