IGoogleMapsApiServiceProxy¶
IGoogleMapsApiServiceProxy is the constructor-injection seam that lets SAIF.Services.Legal.Subpoenas.SubpoenaService request driving distances without depending on GoogleMapsApiServiceProxy's concrete WebRequest-based implementation. It exposes four distance-computation shapes with different error-tolerance behaviors.
Purpose¶
- Define the distance-query contract consumed via dependency injection: single-pair, one-to-many, many-to-one, and full-matrix pairwise queries (OP-WP-09).
Context¶
- Namespace:
SAIF.Services.Web.Proxies - Assembly/package:
SAIF.Services.Web.Proxies(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetMilesBetweenTwoAddresses |
decimal GetMilesBetweenTwoAddresses(string origin, string destination) |
Returns the driving distance in miles between one origin and one destination; any failure throws a generic mileage-error exception |
GetMilesFromManyToOneAddress |
IList<decimal> GetMilesFromManyToOneAddress(IList<string> origins, string destination) |
Returns miles from each origin to a single destination; a failing element yields 0 rather than throwing (WP-BR-024) |
GetMilesFromOneToManyAddresses |
IList<decimal> GetMilesFromOneToManyAddresses(string origin, IList<string> destinations) |
Returns miles from a single origin to each destination; a failing element yields 0 rather than throwing (WP-BR-024) |
GetMilesBetweenMultipleAddresses |
IList<decimal> GetMilesBetweenMultipleAddresses(IList<string> origins, IList<string> destinations) |
Returns pairwise miles for equal-length origin/destination lists, throwing if the counts differ (WP-BR-025) |
Behavioral notes¶
- The sole implementation in this library,
GoogleMapsApiServiceProxy, additionally exposesGetDataBetweenTwoAddresses, which is not part of this interface and returns a structuredDistanceResultswith anErrorMessagefield instead of throwing on a non-OK status (WP-BR-023).
Constraints and usage notes¶
- No Autofac registration for this interface exists anywhere in this repository; the composition root that wires it for
SubpoenaServiceis external**.
Note: Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
Services/SAIF.Services.Web.Proxies/GoogleMapsApiServiceProxy.cs