private async Task RunAsync(TestContextBase test, Func<IHTMLBinding, Task> Run, string memberName)
 {
     _Logger.Info($"Starting {memberName}");
     using (Tester(test.Path))
     {        
         _Logger.Info("Begin Binding");
         using (var mb = await test.Bind(_ViewEngine))
         {
             _Logger.Info("End Binding");
             _Logger.Info("Begin Run");
             await Run(mb);
             _Logger.Info("Ending Run");
         }
         _Logger.Info($"Ending {memberName}");
     }
 }
Beispiel #2
0
        private async Task RunAsync(TestContextBase test, Func <IHTMLBinding, Task> Run, string memberName)
        {
            _Logger.Info($"Starting {memberName}");
            using (Tester(test.Path))
            {
                _Logger.Info("Begin Binding");
                using (var mb = await test.Bind(_ViewEngine))
                {
                    _Logger.Info("End Binding");
                    _Logger.Info("Begin Run");
                    await Run(mb);

                    _Logger.Info("Ending Run");
                }
                _Logger.Info($"Ending {memberName}");
            }
        }
        private async Task RunAsync <TContext>(TestContextBase <TContext> test, Func <TContext, Task> run, string memberName) where TContext : IDisposable
        {
            _Logger.Info($"Starting {memberName}");
            using (Tester(test.Path))
            {
                _Logger.Info("Begin Binding");
                var mb = await EvaluateSafeUI(() => test.Bind(_ViewEngine));

                _Logger.Info("End Binding");
                _Logger.Info("Begin Run");
                await run(mb);

                _Logger.Info("Ending Run");
                await DoSafeAsyncUI(() => mb.Dispose());

                _Logger.Info($"Ending {memberName}");
            }
        }