コード例 #1
0
        public static async Task Main(string[] args)
        {
            IFileDownloadService service = null;

            try
            {
                DependencyRegistration.Register();
                service = WindsorContainer.Instance.Resolve <IFileDownloadService>();
                FileDownloadResult results = await service.DownloadStatsFile();

                Environment.Exit(results.Success ? 0 : -1);
            }
            catch (Exception ex)
            {
                TryLogException(ex);
                Environment.Exit(-1);
            }
            finally
            {
                WindsorContainer.Instance.Release(service);
                WindsorContainer.Dispose();
                LogManager.Shutdown();
            }
        }
コード例 #2
0
 private Task <FileDownloadResult> InvokeDownloadFile()
 {
     return(systemUnderTest.DownloadStatsFile());
 }