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); } }