public async Task Consume(ConsumeContext <ISearchCompleteCommand> context) { var command = new SearchCompleteCommand( context.Message.SourceId, context.Message.FileId, context.Message.ResultStatus, context.Message.ErrorText, context.Message.FileIdFromSource); await _mediator.Send(command); }
private void SearchCompleted() { SearchResultInfo result = SearchResultInfo.Empty; if (SelectedItem != null) { result = new SearchResultInfo(SearchResultKind.Item, SelectedItem.DataContext); } else if (!String.IsNullOrWhiteSpace(_editableTextBox.Text)) { result = new SearchResultInfo(SearchResultKind.RawTextInput, _editableTextBox.Text); } if (SearchCompleteCommand != null) { SearchCompleteCommand.Execute(result); } Unfocus(); }