Exemplo n.º 1
0
        private ReportAndCancellationToken GetToken(int iterationsCount)
        {
            var token = new ReportAndCancellationToken();
            var prop  = token.GetType().GetProperty("NumberOfIterations", BindingFlags.Instance | BindingFlags.NonPublic);

            prop.SetValue(token, iterationsCount, null);
            return(token);
        }
Exemplo n.º 2
0
 private bool ShouldReport(ReportAndCancellationToken token, int taken)
 {
     return((bool)shouldReportMethod.Invoke(token, new object[] { taken }));
 }