public void AddRegistrationEntry(Type type, string name, RegistrationEntry entry)
 {
     lock (this.syncObject)
     {
         // New registrations are added to a different dictionary to avoid changing the registrations.
         this.updatedRegistrations[new RegistrationKey(type, name)] = entry;
         this.registrationsChanged = true;
     }
 }
 public void AddRegistrationEntry(Type type, RegistrationEntry entry)
 {
     this.AddRegistrationEntry(type, string.Empty, entry);
 }
Example #3
0
 private object ResolveRegistrationEntry(RegistrationEntry registrationEntry, ResolutionContext resolutionContext)
 {
     var value = registrationEntry.Lifetime.GetValue(resolutionContext, () => registrationEntry.Factory.CreateObject(this, resolutionContext));
     return value;
 }
Example #4
0
 private void AddDefaultRegistrations()
 {
     var registrationEntry = new RegistrationEntry(typeof(Container), string.Empty, new ContainerLifetime(this));
     this.AddRegistrationEntry(typeof(Container), registrationEntry);
 }
Example #5
0
 private RegistrationEntry AddDefaultRegistrationEntry(Type type)
 {
     var registrationEntry = new RegistrationEntry(type);
     this.repository.AddRegistrationEntry(type, registrationEntry);
     return registrationEntry;
 }
Example #6
0
 public void AddRegistrationEntry(Type type, RegistrationEntry entry)
 {
     this.repository.AddRegistrationEntry(type, entry);
 }