public static BuiltComponents Build(SimpleProcessElement simpleConfig)
        {
            var counterElement = new ProcessElement(simpleConfig);
            var sourceConfig = new ProcessUptimeSourceConfiguration(new[] { counterElement });
            var source = ProcessUptimeSourceBuilder.Build(sourceConfig);

            return SimpleComponentBuilder.BuildStandardSinkSet(simpleConfig, source);
        }
        public static IEnumerable<ISnapshotProvider> Build(ProcessUptimeSourceConfiguration processUptimeSourceConfiguration)
        {
            var processUptimeSources = new List<ISnapshotProvider>();

            foreach (ProcessElement config in processUptimeSourceConfiguration.Processes)
            {
                processUptimeSources.Add(new ProcessUptimeSource(config));
            }

            return processUptimeSources;
        }
        public void CanBuildSourcesBasedOnConfig()
        {
            var name = "testSource";

            var configs = new[]
                {
                    new ProcessElement("id", name, "exe", "machine")
                };

            var configCollection = new ProcessUptimeSourceConfiguration(configs); 

            var sources = ProcessUptimeSourceBuilder.Build(configCollection);

            Assert.AreEqual(1, sources.Count());
            Assert.AreEqual(name, sources.First().Name);
        }