public ITracker Resolve(string key, string type) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var result = trackers.GetOrAdd($"{key}_{type}", new Lazy <ITracker>(() => trackerFactory.Construct(key, type))); return(result.Value); }