public void SearchRoute(object args)
        {
            _updateInformationAboutSearching = ((SearchRouteArgs)args).DelegateToUpdatingInformationAboutSearching;
            _updateInformationAboutSearching("Searching direct connection", 0);
            Delegates.DeliverResults deliverResults = ((SearchRouteArgs)args).DelegateToDeliverResultsToView;

            List<SearchResultConnection> result = new List<SearchResultConnection>();

            SoughtConnection soughtConnection = ((SearchRouteArgs)args).UserSearchArgs.SoughtConnectionByUser;
            SearcherOfDirectRoutes searcherDirectRoutes = new SearcherOfDirectRoutes();
            SearchResultConnection directConnection = searcherDirectRoutes.FindDirectConnection(_repository, soughtConnection);
            if (directConnection != null)
            {
                result.Add(directConnection);
                deliverResults(result);
                result.Remove(directConnection);
            }

            if (((SearchRouteArgs)args).UserSearchArgs.ShouldSearchOnlyDirectConnections)
            {
                if (directConnection == null)
                {
                    _updateInformationAboutSearching("No results", 100);
                }
                else
                {
                    _updateInformationAboutSearching("Searching done", 100);
                }
                return;
            }
            _updateInformationAboutSearching("Searching indirect connection", 10);
            SearcherOfIndirectRoutes searcherOfIndirectRoutes = new SearcherOfIndirectRoutes();
            List<SearchResultConnection> indirectConnection = searcherOfIndirectRoutes.FindIndirectConnection(_repository, soughtConnection, _processInformationAboutIndirectSearchingAndDeliverToTheView);
            if (indirectConnection == null)
            {
                if (directConnection == null)
                {
                    _updateInformationAboutSearching("No results", 100);
                }
                else
                {
                    _updateInformationAboutSearching("Searching done", 100);
                }
                return;
            }
            result.AddRange(indirectConnection);
            deliverResults(result);

            if (directConnection == null && (indirectConnection == null || indirectConnection.Count == 0))
            {
                _updateInformationAboutSearching("No results", 100);
            }
            else
            {
                _updateInformationAboutSearching("Searching done", 100);
            }
        }
 private void SetDelagetes()
 {
     _ShowTimeForActualizationOfSchedule += ActualizeTimeForLoadingNewSchedule;
     _ShowTimeForSearchingRoute += ActualizeTimeForSearchingRoute;
     _deliverResultsToView += DeliverResultOfSearchingToTheView;
 }