public static IServiceCollection ProvideRequestCreation(this IServiceCollection services, RequestFactory factory) { services.Replace(ServiceDescriptor.Singleton(factory)); return(services); }