-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
51 lines (44 loc) · 1.34 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="CodeRanger.com">
// Copyright (c) CodeRanger.com. All rights reserved.
// </copyright>
// <author>Dan Petitt</author>
// <comment />
//-----------------------------------------------------------------------
namespace WebTest
{
using System;
using Logging;
internal class Program
{
public enum ExitCode
{
Success = 0,
Error = 1
}
private static int Main( string[] args )
{
var logger = new LoggerConsoleShim();
var settings = new Settings();
var retCode = ExitCode.Success;
try
{
var app = new WebTestApp( logger, settings, args );
retCode = app.Execute() ? ExitCode.Success : ExitCode.Error;
}
catch( Exception ex )
{
logger.Error( $"ERROR: Failed because {ex.Message}" );
retCode = ExitCode.Error;
}
if( retCode == ExitCode.Success )
logger.Info( "Success, all done!" );
else
logger.Error( "Failed, some requests were in error" );
#if DEBUG
Console.ReadKey();
#endif
return (int)retCode;
}
}
}