Changed from IResolver<T> to Func<T>