public ServicesObjectBuilder(IServiceCollection services, bool owned)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services), "The object builder must be initialized with a valid service collection instance.");
            }

            _owned = owned;
            _runtimeServiceProvider = new UpdateableServiceProvider(services);
            _services = services;
        }
 private ServicesObjectBuilder(bool owned, UpdateableServiceProvider updateableServiceProvider)
 {
     _owned = owned;
     _runtimeServiceProvider = updateableServiceProvider;
     _scope = _runtimeServiceProvider.CreateScope();
 }