9 |
using System.Collections.Specialized; |
using System.Collections.Specialized; |
10 |
using System.Runtime.InteropServices; |
using System.Runtime.InteropServices; |
11 |
|
|
12 |
|
using DaoCommon; |
13 |
|
using IBM.WMQ; |
14 |
|
|
15 |
|
|
16 |
namespace MQFilter |
namespace MQFilter |
17 |
{ |
{ |
20 |
static void Main(string[] args) |
static void Main(string[] args) |
21 |
{ |
{ |
22 |
|
|
23 |
if (args.Length == 1) |
|
24 |
|
if (args.Length == 1) |
25 |
{ |
{ |
26 |
if (args[0] == "--debug") |
if (args[0] == "--debug") |
27 |
{ |
{ |
28 |
try |
try |
29 |
{ |
{ |
|
|
|
30 |
|
|
31 |
TransportController controller = TransportController.getInstance(); |
|
32 |
|
FilterController controller = FilterController.getInstance(); |
33 |
|
|
34 |
ElapsedTimer timer = new ElapsedTimer(); |
ElapsedTimer timer = new ElapsedTimer(); |
35 |
controller.transportAllMessages(); |
controller.transportAllMessages(); |
39 |
} |
} |
40 |
catch (Exception e) |
catch (Exception e) |
41 |
{ |
{ |
42 |
|
|
43 |
Console.WriteLine("Error: " + e.Message); |
Console.WriteLine("Error: " + e.Message); |
44 |
|
Console.WriteLine(e.StackTrace); |
45 |
} |
} |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
Console.WriteLine("Press any key to continue"); |
Console.WriteLine("Press any key to continue"); |
52 |
Console.ReadKey(); //wait for user input |
Console.ReadKey(); //wait for user input |
53 |
} |
} |
54 |
else if (args[0] == "/i" || args[0] == "/u") |
else if (args[0] == "/i" || args[0] == "/u") |
55 |
{ |
{ |
56 |
|
|
63 |
{ |
{ |
64 |
undo = true; |
undo = true; |
65 |
} |
} |
66 |
MyServiceInstaller.DoInstall(undo, new string[] { }); |
MyServiceInstaller.DoInstall(undo, new string[] { }); |
67 |
} |
} |
68 |
else |
else |
69 |
{ |
{ |