public void PerformSearch()
        {
            var initialSearchCommand = new AimDataServiceSearchCommand();

            initialSearchCommand.Coordinator = this;
            SearchResultsComponent.Table.Items.Clear();

            _uiThreadSynchronizationContext = SynchronizationContext.Current;

            _totalCommandsToExecute = 1;
            _commandsExecuted       = 0;

            _cancel       = false;
            _resultsAdded = false;

            SearchResultsComponent.Title = "Searching...";

            ApiKeyCredentials credentials = AimDataServiceLoginTool.Credentials;

            if (credentials == null)
            {
                AimDataServiceLoginTool.RequestLogin();
                credentials = AimDataServiceLoginTool.Credentials;
            }

            if (credentials != null)
            {
                _threadPool.Start();
                _threadPool.Enqueue(initialSearchCommand.Execute);
            }
        }
        public void PerformSearch()
        {
            var initialSearchCommand = new AimDataServiceSearchCommand();

            initialSearchCommand.Coordinator = this;
            SearchResultsComponent.Table.Items.Clear();

            _uiThreadSynchronizationContext = SynchronizationContext.Current;

            _totalCommandsToExecute = 1;
            _commandsExecuted = 0;

            _cancel = false;
            _resultsAdded = false;

            SearchResultsComponent.Title = "Searching...";

            ApiKeyCredentials credentials = AimDataServiceLoginTool.Credentials;

            if (credentials == null)
            {
                AimDataServiceLoginTool.RequestLogin();
                credentials = AimDataServiceLoginTool.Credentials;
            }

            if (credentials != null)
            {
                _threadPool.Start();
                _threadPool.Enqueue(initialSearchCommand.Execute);
            }
        }
Ejemplo n.º 3
0
 protected void EnqueueNextCommand(AimDataServiceSearchCommand nextCommand)
 {
     nextCommand.Coordinator = Coordinator;
     Coordinator._totalCommandsToExecute++;
     Coordinator._threadPool.Enqueue(nextCommand.Execute);
 }
 protected void EnqueueNextCommand(AimDataServiceSearchCommand nextCommand)
 {
     nextCommand.Coordinator = Coordinator;
     Coordinator._totalCommandsToExecute++;
     Coordinator._threadPool.Enqueue(nextCommand.Execute);
 }