public Func<object> GetTypeFactory(Type interfaceType) { return factories.GetOrAdd(interfaceType, CreateFactory); }