/// <summary>
        /// Registers projection handlers for mongodb
        /// </summary>
        /// <param name="descriptor">The descriptor where the handlers are registered</param>
        /// <returns>The <paramref name="descriptor"/></returns>
        /// <exception cref="ArgumentNullException">
        /// Throws in case the argument <paramref name="descriptor"/> is null
        /// </exception>
        public static IProjectionProviderDescriptor RegisterMongoDbHandlers(
            this IProjectionProviderDescriptor descriptor)
        {
            if (descriptor is null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            descriptor.RegisterFieldHandler <MongoDbProjectionScalarHandler>();
            descriptor.RegisterFieldHandler <MongoDbProjectionFieldHandler>();
            descriptor.RegisterOptimizer <QueryablePagingProjectionOptimizer>();
            descriptor.RegisterOptimizer <IsProjectedProjectionOptimizer>();
            return(descriptor);
        }
        public static IProjectionProviderDescriptor RegisterQueryableHandler(
            this IProjectionProviderDescriptor descriptor)
        {
            if (descriptor is null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            descriptor.RegisterFieldHandler <QueryableProjectionScalarHandler>();
            descriptor.RegisterFieldHandler <QueryableProjectionListHandler>();
            descriptor.RegisterFieldHandler <QueryableProjectionFieldHandler>();

            descriptor.RegisterFieldInterceptor <QueryableFilterInterceptor>();
            descriptor.RegisterFieldInterceptor <QueryableSortInterceptor>();
            descriptor.RegisterFieldInterceptor <QueryableFirstOrDefaultInterceptor>();
            descriptor.RegisterFieldInterceptor <QueryableSingleOrDefaultInterceptor>();

            descriptor.RegisterOptimizer <IsProjectedProjectionOptimizer>();
            descriptor.RegisterOptimizer <QueryablePagingProjectionOptimizer>();
            descriptor.RegisterOptimizer <QueryableFilterProjectionOptimizer>();
            descriptor.RegisterOptimizer <QueryableSortProjectionOptimizer>();

            return(descriptor);
        }