Example #1
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomSinkNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomSinkData), SR.CustomSink);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(EmailSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(EmailSinkData), SR.EmailSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(EventLogSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(EventLogSinkData), SR.EventLogSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(FlatFileSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(FlatFileSinkData), SR.FlatFileSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(RollingFlatFileSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(RollingFlatFileSinkData), SR.RollingFlatFileSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ConsoleSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(ConsoleSinkData), SR.ConsoleSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(MsmqSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(MsmqSinkData), SR.MsmqSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(WmiLogSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(WMILogSinkData), SR.WmiLogSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(WSSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(WSSinkNode), SR.WSSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomFormatterNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomFormatterData), SR.CustomFormatter);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(TextFormatterNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(TextFormatterData), SR.TextFormatter);
            nodeCreationService.AddNodeCreationEntry(entry);
        }