public void Register <TInterface>(object instance, LifeTypes lifeType = LifeTypes.Single) { Type type = instance.GetType(); Register(typeof(TInterface), type, lifeType); _instances[type] = instance; }
public void Register(Type service, Type implementation, LifeTypes lifeType = LifeTypes.Single) { if (service.IsGenericType && service.FullName == null) { service = service.GetGenericTypeDefinition(); } _registrations[service] = new Registration(implementation, lifeType); }
public InjectAttribute(LifeTypes lifetype = LifeTypes.Single, InjectType injectType = InjectType.AsInterface) { _lifeType = lifetype; _injectType = injectType; }
public void Register <TInterface, TImplementation>(LifeTypes lifeType = LifeTypes.Single) { Register(typeof(TInterface), typeof(TImplementation), lifeType); }
public Registration(Type type, LifeTypes lifeType) { _type = type; _lifeType = lifeType; }