UsingBingMaps.Helpers.RouteCalculator.RouteCalculator C# (CSharp) Method

RouteCalculator() public method

public RouteCalculator ( CredentialsProvider credentialsProvider, Location to, Location from, Dispatcher uiDispatcher, Action routeFound ) : System
credentialsProvider CredentialsProvider
to Location
from Location
uiDispatcher System.Windows.Threading.Dispatcher
routeFound Action
return System
        public RouteCalculator(
            CredentialsProvider credentialsProvider,
            Location to,
            Location from,
            Dispatcher uiDispatcher,
            Action<RouteResponse> routeFound)
        {
            if (credentialsProvider == null)
            {
                throw new ArgumentNullException("credentialsProvider");
            }           
            if (uiDispatcher == null)
            {
                throw new ArgumentNullException("uiDispatcher");
            }

            if (routeFound == null)
            {
                throw new ArgumentNullException("routeFound");
            }
            
            from_address = false;
            x_from = from;
            x_to = to;

            _credentialsProvider = credentialsProvider;
            _uiDispatcher = uiDispatcher;
            _routeFound = routeFound;

            

            _routeClient = new RouteServiceClient();
            _routeClient.CalculateRouteCompleted += client_RouteCompleted;

            // Calculate the route.
            CalculateRoute();
        }
        #endregion

Same methods

RouteCalculator::RouteCalculator ( CredentialsProvider credentialsProvider, string to, string from, Dispatcher uiDispatcher, Action routeFound ) : System