public RouteCalculator(
CredentialsProvider credentialsProvider,
string to,
string from,
Dispatcher uiDispatcher,
Action<RouteResponse> routeFound)
{
if (credentialsProvider == null)
{
throw new ArgumentNullException("credentialsProvider");
}
if (string.IsNullOrEmpty(to))
{
throw new ArgumentNullException("to");
}
if (string.IsNullOrEmpty(from))
{
throw new ArgumentNullException("from");
}
if (uiDispatcher == null)
{
throw new ArgumentNullException("uiDispatcher");
}
if (routeFound == null)
{
throw new ArgumentNullException("routeFound");
}
_credentialsProvider = credentialsProvider;
_to = to;
_from = from;
_uiDispatcher = uiDispatcher;
_routeFound = routeFound;
_geocodeClient = new GeocodeServiceClient();
_geocodeClient.GeocodeCompleted += client_GeocodeCompleted;
_routeClient = new RouteServiceClient();
_routeClient.CalculateRouteCompleted += client_RouteCompleted;
}
public RouteCalculator(