public void ApplyConfiguration(ParameterInfo parameter, ObjectFieldDescriptor descriptor)
    {
        switch (_kind)
        {
        case ServiceKind.Pooled:
            UseDbContext <TDbContext>(descriptor.Extend().Definition);
            break;

        case ServiceKind.Synchronized:
            ServiceExpressionHelper.ApplyConfiguration(parameter, descriptor, _kind);
            break;

        case ServiceKind.Resolver:
            ServiceExpressionHelper.ApplyConfiguration(parameter, descriptor, _kind);
            ObjectFieldDefinition     definition            = descriptor.Extend().Definition;
            FieldMiddlewareDefinition placeholderMiddleware =
                new(_ => _ => throw new NotSupportedException(), key : ToList);
            FieldMiddlewareDefinition serviceMiddleware =
                definition.MiddlewareDefinitions.Last(t => t.Key == PooledService);
            var index = definition.MiddlewareDefinitions.IndexOf(serviceMiddleware) + 1;
            definition.MiddlewareDefinitions.Insert(index, placeholderMiddleware);
            AddCompletionMiddleware(definition, placeholderMiddleware);
            break;
        }
    }
    public static void ApplyConfiguration(
        ParameterInfo parameter,
        ObjectFieldDescriptor descriptor,
        ServiceKind serviceKind)
    {
        if (parameter is null)
        {
            throw new ArgumentNullException(nameof(parameter));
        }

        if (descriptor is null)
        {
            throw new ArgumentNullException(nameof(descriptor));
        }

        switch (serviceKind)
        {
        case ServiceKind.Default:
            return;

        case ServiceKind.Synchronized:
            descriptor.Extend().Definition.IsParallelExecutable = false;
            break;

        case ServiceKind.Pooled:
            ServiceHelper.UsePooledService(descriptor.Definition, parameter.ParameterType);
            break;

        case ServiceKind.Resolver:
            ServiceHelper.UseResolverService(descriptor.Definition, parameter.ParameterType);
            return;

        default:
            throw new NotSupportedException(
                      $"Service kind `{serviceKind}` is not supported.");
        }
    }