public void Failed0() { AsyncContext.Run(async() => { await AssertEx.ThrowsExceptionAsync <InvalidOperationException>(AsyncFactory.FromApm(BeginFail0, End)); }); }
public void Cancelled0() { AsyncContext.Run(async() => { await AssertEx.CompletesCanceledAsync(AsyncFactory.FromApm(BeginCancel0, End)); }); }
public void Args0() { AsyncContext.Run(async() => { await AsyncFactory.FromApm(BeginSuccess0, End); }); }
public void Args0() { Test.Async(async() => { await AsyncFactory.FromApm(BeginSuccess0, End); }); }
public void Args14() { AsyncContext.Run(async() => { IntReference counter = new IntReference(); await AsyncFactory.FromApm(BeginSuccess14, End, counter, counter, counter, counter, counter, counter, counter, counter, counter, counter, counter, counter, counter, counter); Assert.AreEqual(1, counter.Value); }); }
public void Args9() { Test.Async(async() => { IntReference counter = new IntReference(); await AsyncFactory.FromApm(BeginSuccess9, End, counter, counter, counter, counter, counter, counter, counter, counter, counter); Assert.AreEqual(1, counter.Value); }); }
protected Task IfHasPendingThenFlushTrackingRecordsAsync() { if (this.Controller.HasPendingTrackingRecords) { return(AsyncFactory.FromApm <TimeSpan>(this.Controller.BeginFlushTrackingRecords, this.Controller.EndFlushTrackingRecords, this.Parameters.TrackingTimeout)); } else { return(TaskConstants.Completed); } }
public static Task OnSaveAsync(this System.Activities.Persistence.PersistenceIOParticipant persistenceIOParticipant, IDictionary <XName, object> readWriteValues, IDictionary <XName, object> writeOnlyValues, TimeSpan timeout) => AsyncFactory.FromApm <IDictionary <XName, object>, IDictionary <XName, object>, TimeSpan>( persistenceIOParticipant.BeginOnSave, persistenceIOParticipant.EndOnSave, readWriteValues, writeOnlyValues, timeout);