Skip to content

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 in SAIF.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 exposes GetDataBetweenTwoAddresses, which is not part of this interface and returns a structured DistanceResults with an ErrorMessage field 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 SubpoenaService is external**.

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services.Web.Proxies/GoogleMapsApiServiceProxy.cs