private IScopeContext LocateInLoadedAssembliesAndCache(Type type, string named, IScopeContext item, IDependencyResolver resolver) { Logging.DebugMessage(string.Format("Type scanning initiated. Looking for implementations of {0} {1}", type.FullName, GetNameString(named))); var items = AssemblyScanner.LocateInLoadedAssemblies(type, resolver); foreach (var scopeContext in items) { Optimizer.SetImplementationType(type, scopeContext, scopeContext.ImplementationKey); if (scopeContext.ImplementationKey == named) { item = scopeContext; } } return(item); }
private IScopeContext LocateInLoadedAssembliesAndCache(Type type, string named, IScopeContext item) { if (!logSupressor.ContainsKey(type)) { logSupressor.TryAdd(type, true); Logging.DebugMessage($"Type scanning initiated. Looking for implementations of {type.FullName} {GetNameString(named)}"); } var items = AssemblyScanner.LocateInLoadedAssemblies(type); foreach (var scopeContext in items) { Optimizer.SetImplementationType(type, scopeContext, scopeContext.ImplementationKey); if (scopeContext.ImplementationKey == named) { item = scopeContext; } } return(item); }