public IRegistration <IAsTrait> RegisterInstance <T>(object instance) { var instanceType = typeof(T); var registration = new SingleInstanceRegistration(instance, instanceType); _registrations.Add(registration); return(registration); }
public IRegistration <IAsTrait> RegisterInstance <T>(T instance) where T : class { var instanceType = typeof(T); if (instance != null) { instanceType = instance.GetType(); } var registration = new SingleInstanceRegistration(instance, instanceType); _registrations.Add(registration); return(registration); }