Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Bss.Platform.Mediation.Abstractions/IMediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace Bss.Platform.Mediation.Abstractions;

public interface IMediator
{
public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken);
public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default);

public Task Send(IRequest request, CancellationToken cancellationToken);
public Task Send(IRequest request, CancellationToken cancellationToken = default);

public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken)
public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default)
where TNotification : INotification;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ namespace Bss.Platform.Mediation.Abstractions;
public interface INotificationHandler<in TNotification>
where TNotification : INotification
{
public Task Handle(TNotification notification, CancellationToken cancellationToken);
public Task Handle(TNotification notification, CancellationToken cancellationToken = default);
}
4 changes: 2 additions & 2 deletions src/Bss.Platform.Mediation.Abstractions/IPipelineBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace Bss.Platform.Mediation.Abstractions;

public interface IPipelineBehavior<in TRequest, TResult>
{
public Task<TResult> Handle(TRequest request, RequestHandlerDelegate<TResult> next, CancellationToken cancellationToken);
public Task<TResult> Handle(TRequest request, RequestHandlerDelegate<TResult> next, CancellationToken cancellationToken = default);
}

public interface IPipelineBehavior<in TRequest>
{
public Task Handle(TRequest request, RequestHandlerDelegate next, CancellationToken cancellationToken);
public Task Handle(TRequest request, RequestHandlerDelegate next, CancellationToken cancellationToken = default);
}
4 changes: 2 additions & 2 deletions src/Bss.Platform.Mediation.Abstractions/IRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ namespace Bss.Platform.Mediation.Abstractions;
public interface IRequestHandler<in TRequest>
where TRequest : IRequest
{
public Task Handle(TRequest request, CancellationToken cancellationToken);
public Task Handle(TRequest request, CancellationToken cancellationToken = default);
}

public interface IRequestHandler<in TRequest, TResponse>
where TRequest : IRequest<TResponse>
{
public Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken);
public Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken = default);
}
6 changes: 3 additions & 3 deletions src/Bss.Platform.Mediation/Mediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Bss.Platform.Mediation;

public sealed class Mediator(IServiceProvider serviceProvider) : IMediator
{
public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken)
public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
{
var requestType = request.GetType();
var wrapperType = typeof(RequestHandlerWrapperImpl<,>).MakeGenericType(requestType, typeof(TResponse));
Expand All @@ -15,7 +15,7 @@ public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, Cancellation
return wrapper.Handle(request, serviceProvider, cancellationToken);
}

public Task Send(IRequest request, CancellationToken cancellationToken)
public Task Send(IRequest request, CancellationToken cancellationToken = default)
{
var requestType = request.GetType();
var wrapperType = typeof(VoidRequestHandlerWrapperImpl<>).MakeGenericType(requestType);
Expand All @@ -25,7 +25,7 @@ public Task Send(IRequest request, CancellationToken cancellationToken)
return wrapper.Handle(request, serviceProvider, cancellationToken);
}

public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken)
public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default)
where TNotification : INotification
{
var notificationType = notification.GetType();
Expand Down
6 changes: 3 additions & 3 deletions src/__SolutionItems/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[assembly: AssemblyCompany("Luxoft")]
[assembly: AssemblyCopyright("Copyright © Luxoft 2026")]

[assembly: AssemblyVersion("1.6.6.0")]
[assembly: AssemblyFileVersion("1.6.6.0")]
[assembly: AssemblyInformationalVersion("1.6.6.0")]
[assembly: AssemblyVersion("1.6.7.0")]
[assembly: AssemblyFileVersion("1.6.7.0")]
[assembly: AssemblyInformationalVersion("1.6.7.0")]

#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
Expand Down
Loading