public virtual object Resolve(FastContainer container) { AssertNotDisposed(); if (FastContainer.SupperLogging) { Logger.Debug("Resolving Instance"); } if (this.instancePerCall) { if (FastContainer.SupperLogging) { Logger.Debug("Building New Instance"); } return(this.resolve(container)); } if (FastContainer.SupperLogging) { Logger.Debug("Attempting To Resolve Instance"); } if (this.instance != null) { return(this.instance); } if (FastContainer.SupperLogging) { Logger.Debug("Building And Storing New Instance"); } return(this.instance = this.resolve(container)); }
private FastContainer(FastContainer other) { this.registrations = new Dictionary <Type, FastContainerRegistration>(); foreach (var otherRegistration in other.registrations) { this.registrations.Add(otherRegistration.Key, otherRegistration.Value.Clone()); } }
public FastServiceLocatorImpl(FastContainer container) { this.container = container; }