public void all_instances_when_the_family_already_exists() { var graph = new PluginGraph(); graph.Families.FillDefault(typeof(BigThingy)); graph.AllInstances(typeof(BigThingy)).Any().ShouldBeFalse(); }
public void all_instances_when_family_has_not_been_created() { var graph = new PluginGraph(); graph.AllInstances(typeof(BigThingy)).Any().ShouldBeFalse(); graph.Families.Has(typeof(BigThingy)).ShouldBeFalse(); }
public void Scanner_apply_should_only_register_two_instances() { var scanner = new GenericConnectionScanner(typeof(ISomeServiceOf <>)); var registry = new Registry(); var graph = new PluginGraph(); scanner.Process(typeof(SomeService1), registry); scanner.Process(typeof(SomeService2), registry); scanner.Apply(graph); graph .AllInstances(typeof(ISomeServiceOf <string>)) .Count() .ShouldEqual(2); }
public IEnumerable <Instance> GetAllInstances(Type pluginType) { return(_pluginGraph.AllInstances(pluginType).Union(_parent.Instances.GetAllInstances(pluginType))); }
public IEnumerable <Instance> GetAllInstances(Type pluginType) { return(_pluginGraph.AllInstances(pluginType)); }
public IEnumerable <Instance> GetAllInstances(Type pluginType) { return(_outer.AllInstances(pluginType).Union(_parent.GetAllInstances(pluginType))); }