mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Update doc comments in Features.Breweries source (#279)
This commit is contained in:
@@ -6,12 +6,14 @@ using MediatR;
|
||||
namespace Features.Breweries.Queries.GetBreweryLocationsWithinRange;
|
||||
|
||||
/// <summary>
|
||||
/// Handles <see cref="GetBreweryLocationsWithinRangeQuery" /> by retrieving nearby located brewery posts.
|
||||
/// Handles proximity searches for brewery locations.
|
||||
/// </summary>
|
||||
public class GetBreweryLocationsWithinRangeHandler(IBreweryRepository repository)
|
||||
: IRequestHandler<GetBreweryLocationsWithinRangeQuery, IEnumerable<BreweryWithLocationDto>>
|
||||
{
|
||||
/// <summary>Retrieves brewery posts within range of the requested coordinates, nearest first.</summary>
|
||||
/// <summary>
|
||||
/// Retrieves and maps nearby brewery locations.
|
||||
/// </summary>
|
||||
public async Task<IEnumerable<BreweryWithLocationDto>> Handle(
|
||||
GetBreweryLocationsWithinRangeQuery request,
|
||||
CancellationToken cancellationToken
|
||||
|
||||
@@ -4,12 +4,19 @@ using MediatR;
|
||||
namespace Features.Breweries.Queries.GetBreweryLocationsWithinRange;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves brewery posts with a set location within <paramref name="RangeInMetres" /> of the given
|
||||
/// coordinates, nearest first. Bound directly from the query string of
|
||||
/// <c>GET /api/brewery/locations/nearby</c>.
|
||||
/// Requests located brewery posts near a geographic point, nearest first.
|
||||
/// </summary>
|
||||
/// <param name="Latitude">The origin latitude, in decimal degrees.</param>
|
||||
/// <param name="Longitude">The origin longitude, in decimal degrees.</param>
|
||||
/// <param name="RangeInMetres">The maximum distance, in metres, from the origin coordinates.</param>
|
||||
public record GetBreweryLocationsWithinRangeQuery(double Latitude, double Longitude, double RangeInMetres)
|
||||
: IRequest<IEnumerable<BreweryWithLocationDto>>;
|
||||
/// <param name="Latitude">
|
||||
/// Sets the origin latitude in decimal degrees.
|
||||
/// </param>
|
||||
/// <param name="Longitude">
|
||||
/// Sets the origin longitude in decimal degrees.
|
||||
/// </param>
|
||||
/// <param name="RangeInMetres">
|
||||
/// Sets the inclusive search radius in metres.
|
||||
/// </param>
|
||||
public record GetBreweryLocationsWithinRangeQuery(
|
||||
double Latitude,
|
||||
double Longitude,
|
||||
double RangeInMetres
|
||||
) : IRequest<IEnumerable<BreweryWithLocationDto>>;
|
||||
|
||||
@@ -2,7 +2,9 @@ using FluentValidation;
|
||||
|
||||
namespace Features.Breweries.Queries.GetBreweryLocationsWithinRange;
|
||||
|
||||
/// <summary>Validates <see cref="GetBreweryLocationsWithinRangeQuery" />.</summary>
|
||||
/// <summary>
|
||||
/// Validates coordinates and radius values for proximity searches.
|
||||
/// </summary>
|
||||
public class GetBreweryLocationsWithinRangeValidator
|
||||
: AbstractValidator<GetBreweryLocationsWithinRangeQuery>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user