SenseNet.Messaging.NotificationHandler.GatherConfigsForSubscription C# (CSharp) Method

GatherConfigsForSubscription() private static method

private static GatherConfigsForSubscription ( Subscription subscription, NotificationConfig>.Dictionary configs ) : void
subscription Subscription
configs NotificationConfig>.Dictionary
return void
        private static void GatherConfigsForSubscription(Subscription subscription, Dictionary<string, NotificationConfig> configs)
        {
            // go through related events, and gather available configs
            foreach (var @event in subscription.RelatedEvents)
            {
                // config already resolved for this contentpath
                if (configs.ContainsKey(@event.ContentPath))
                    continue;

                // check custom config
                var query = new ApplicationQuery(NotificationConfig.CONFIGFOLDERNAME, false, false, HierarchyOption.Path);
                var configHeads = query.ResolveApplications(NotificationConfig.NOTIFICATIONCONFIGCONTENTNAME, @event.ContentPath, NotificationConfig.NOTIFICATIONCONFIGTYPENAME);
                var targetConfigHead = configHeads.FirstOrDefault();

                NotificationConfig configNode = null;
                if (targetConfigHead != null)
                {
                    configNode = Node.LoadNode(targetConfigHead.Id) as NotificationConfig;
                }
                configs.Add(@event.ContentPath, configNode);
            }
        }
        private static IEnumerable<Message> GenerateMessagesForConfig(Subscription subscription, Dictionary<string, NotificationConfig> configs)