public void has_instance_negative_when_the_family_has_not_been_created() { var graph = new PluginGraph(); graph.HasInstance(typeof(IThingy), "red") .ShouldBeFalse(); }
public void has_instance_positive() { var graph = new PluginGraph(); graph.Families[typeof(IThingy)] .AddInstance(new SmartInstance <BigThingy>().Named("blue")); graph.HasInstance(typeof(IThingy), "blue") .ShouldBeTrue(); }
public void has_instance_negative_with_the_family_already_existing() { var graph = new PluginGraph(); graph.Families[typeof(IThingy)] .AddInstance(new SmartInstance <BigThingy>().Named("blue")); graph.HasInstance(typeof(IThingy), "red") .ShouldBeFalse(); }
public bool HasInstance(Type pluginType, string instanceKey) { return(_pluginGraph.HasInstance(pluginType, instanceKey) || _parent.Instances.HasInstance(pluginType, instanceKey)); }
public bool HasInstance(Type pluginType, string instanceKey) { return(_outer.HasInstance(pluginType, instanceKey) || _parent.HasInstance(pluginType, instanceKey)); }