Exemplo n.º 1
0
        public void all_instances_when_the_family_already_exists()
        {
            var graph = new PluginGraph();

            graph.Families.FillDefault(typeof(BigThingy));

            graph.AllInstances(typeof(BigThingy)).Any().ShouldBeFalse();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 4
0
 public IEnumerable <Instance> GetAllInstances(Type pluginType)
 {
     return(_pluginGraph.AllInstances(pluginType).Union(_parent.Instances.GetAllInstances(pluginType)));
 }
Exemplo n.º 5
0
 public IEnumerable <Instance> GetAllInstances(Type pluginType)
 {
     return(_pluginGraph.AllInstances(pluginType));
 }
Exemplo n.º 6
0
 public IEnumerable <Instance> GetAllInstances(Type pluginType)
 {
     return(_outer.AllInstances(pluginType).Union(_parent.GetAllInstances(pluginType)));
 }