private void AddInstanceToInjector(ConstructableType blueprint, Type[] instanceTypes, object constructedInstance) { Injector.Add(instanceTypes, constructedInstance); if (blueprint.GetAttribute().Name != null) { Injector.Add(blueprint.GetAttribute().Name, constructedInstance); } }
private Type[] ConstructBlueprintAndGetTypesOfInstance(ConstructableType blueprint) { var instanceTypes = GetAllImplementingTypesForType(blueprint.Constructable); AddInstanceToInjector(blueprint, instanceTypes, blueprint.Construct(Injector)); blueprints.Remove(blueprint); return(instanceTypes); }