System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at MediatR.Wrappers.NotificationHandlerWrapperImpl1.Handle(INotification notification, IServiceProvider serviceFactory, Func4 publish, CancellationToken cancellationToken)
at MediatR.Mediator.PublishNotification(INotification notification, CancellationToken cancellationToken)
at MediatR.Mediator.Publish[TNotification](TNotification notification, CancellationToken cancellationToken)
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'IServiceProvider'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException() at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at MediatR.Wrappers.NotificationHandlerWrapperImpl
1.Handle(INotification notification, IServiceProvider serviceFactory, Func
4 publish, CancellationToken cancellationToken) at MediatR.Mediator.PublishNotification(INotification notification, CancellationToken cancellationToken) at MediatR.Mediator.Publish[TNotification](TNotification notification, CancellationToken cancellationToken)