public void Process(Type type, Registry registry) { if (type.CanBeCastTo(_pluginType) && Constructor.HasConstructors(type)) { string name = _getName(type); registry.AddType(GetLeastSpecificButValidType(_pluginType, type), type, name); } }
private void assertPluggability(Type pluggedType) { if (!pluggedType.CanBeCastTo(_pluginType)) { throw new StructureMapException(104, pluggedType, _pluginType); } if (!Constructor.HasConstructors(pluggedType)) { throw new StructureMapException(180, pluggedType.AssemblyQualifiedName); } }
public override void Process(Type type, Registry registry) { if (!type.IsConcrete()) { return; } Type pluginType = FindPluginType(type); if (pluginType != null && Constructor.HasConstructors(type)) { registry.AddType(pluginType, type); ConfigureFamily(registry.For(pluginType)); } }
public bool CanBeCreated() { return(Constructor.HasConstructors(_pluggedType)); }