Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with dotnet-format #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion src/Abstractions/ICreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
namespace Dgmjr.MediatR.Abstractions;

public interface ICreateCommand<TId, TCreateDto, TDto> : ICommand<TDto>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/ICreateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ namespace Dgmjr.MediatR.Handlers.Abstractions;
public interface ICreateHandler<TCreateCommand, TId, TCreateDto, TDto>
: IRequestHandler<TCreateCommand, TDto>
where TId : IComparable, IEquatable<TId>
where TCreateCommand : ICreateCommand<TId, TCreateDto, TDto> { }
where TCreateCommand : ICreateCommand<TId, TCreateDto, TDto>
{ }
6 changes: 4 additions & 2 deletions src/Abstractions/IDelete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
namespace Dgmjr.MediatR.Abstractions;

public interface IDeleteCommand<TId, TDto> : IDeleteCommand<TId>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }

public interface IDeleteCommand<TId> : ICommand<Unit>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
6 changes: 4 additions & 2 deletions src/Abstractions/IDeleteHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ namespace Dgmjr.MediatR.Handlers.Abstractions;

public interface IDeleteHandler<TDeleteCommand, TId, TDto> : IDeleteHandler<TDeleteCommand, TId>
where TId : IComparable, IEquatable<TId>
where TDeleteCommand : IDeleteCommand<TId, TDto> { }
where TDeleteCommand : IDeleteCommand<TId, TDto>
{ }

public interface IDeleteHandler<TDeleteCommand, TId> : IRequestHandler<TDeleteCommand, Unit>
where TId : IComparable, IEquatable<TId>
where TDeleteCommand : IDeleteCommand<TId> { }
where TDeleteCommand : IDeleteCommand<TId>
{ }
6 changes: 4 additions & 2 deletions src/Abstractions/IDeletedNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
namespace Dgmjr.MediatR.Abstractions;

public interface IDeletedNotification<TId, TDto> : INotification
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }

public interface IDeletedNotification<TId> : INotification
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/IPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
namespace Dgmjr.MediatR.Abstractions;

public interface IPatchCommand<TId, TPatchDto, TDto> : ICommand<TDto>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/IPatchHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ namespace Dgmjr.MediatR.Handlers.Abstractions;
public interface IPatchHandler<TPatchCommand, TId, TPatchDto, TDto>
: IRequestHandler<TPatchCommand, TDto>
where TPatchCommand : IPatchCommand<TId, TPatchDto, TDto>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/IQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
namespace Dgmjr.MediatR.Abstractions;

public interface IQuery<TId, TDto> : IQueryBase<TDto>, IRequest<TDto>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }

public interface IQuery<TDto> : IQueryBase<TDto>, IRequest<IEnumerable<TDto>>
{
Expand Down
6 changes: 4 additions & 2 deletions src/Abstractions/IQueryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public interface IQueryHandler<TQuery, TId, TModel, TDto> : IRequestHandler<TQue
where TQuery : IQuery<TId, TDto>
where TId : IComparable, IEquatable<TId>
where TDto : IIdentifiable<TId>
where TModel : IIdentifiable<TId> { }
where TModel : IIdentifiable<TId>
{ }

public interface IQueryHandler<TQuery, TDto> : IRequestHandler<TQuery, IEnumerable<TDto>>
where TQuery : IQuery<TDto> { }
where TQuery : IQuery<TDto>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/IUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ namespace Dgmjr.MediatR.Abstractions;

public interface IUpdateCommand<TModel, TId, TUpdateDto, TDto> : ICommand<TDto>
where TModel : class, IIdentifiable<TId>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
3 changes: 2 additions & 1 deletion src/Abstractions/IUpdateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public interface IUpdateHandler<TUpdateCommand, TId, TModel, TUpdateDto, TDto>
: IRequestHandler<TUpdateCommand, TDto>
where TUpdateCommand : IUpdateCommand<TModel, TId, TUpdateDto, TDto>
where TModel : class, IIdentifiable<TId>
where TId : IComparable, IEquatable<TId> { }
where TId : IComparable, IEquatable<TId>
{ }
4 changes: 2 additions & 2 deletions src/MediatR/Commands/Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public record struct DeleteCommand<TId, TDto>(TDto Dto, TId Id) : IDeleteCommand
// Id = id;
// }

public TDto Dto { get; } = Dto;
public TId Id { get; } = Id;
public TDto Dto { get; } = Dto;
public TId Id { get; } = Id;
}

public record struct DeleteCommand<TId>(TId Id) : IDeleteCommand<TId>
Expand Down