/// <summary> /// Aborts sending result to server. /// </summary> public void AbortSending() { if (IsSending) { ResultSender.AbortSaving(); } }
/// <summary> /// Sends result to server. /// </summary> /// <param name="selectedListBoxItem">Contains information of result that was selected by user and will be send on server.</param> public void SendResult(ResultBasicInfo selectedListBoxItem) { ProgressBar.Information = Languages.AppResources.surveyViewModel_sendingProgressTitle; ProgressBar.IsEnabled = true; Operations = new OperationsOnListOfResults(selectedListBoxItem.ParentId); IsSending = true; ResultSender.Send(selectedListBoxItem.ParentId, selectedListBoxItem); }
public override void Given() { base.Given(); ResultSender.Setup(x => x.Send(It.IsAny <string>(), It.IsAny <IEpcisResponse>(), It.IsAny <CancellationToken>())).Returns(() => Task.FromResult(false)); Subscription = new Subscription { SubscriptionId = "sub", QueryName = "SimpleEventQuery", Destination = "http://subscription-result.com/callback", ReportIfEmpty = true }; }