Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.

Commit 8c0aee7

Browse files
committed
move intialize() to static constructor
1 parent 22edc83 commit 8c0aee7

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

EventHook/ApplicationWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static void Start()
5757

5858
appQueue = new AsyncCollection<object>();
5959

60-
SharedMessagePump.Initialize();
60+
6161
Task.Factory.StartNew(() => { }).ContinueWith(x =>
6262
{
6363
WindowHook.WindowCreated += new GeneralShellHookEventHandler(WindowCreated);

EventHook/ClipboardWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void Start()
4646
{
4747
_clipQueue = new AsyncCollection<object>();
4848

49-
SharedMessagePump.Initialize();
49+
5050
Task.Factory.StartNew(() => { }).ContinueWith(x =>
5151
{
5252
_clip = new ClipBoardHook();

EventHook/Helpers/SharedMessagePump.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static SharedMessagePump()
7474
});
7575
}
7676

77-
internal static void Initialize()
77+
private static void Initialize()
7878
{
7979
GetTaskScheduler();
8080
GetHandle();

EventHook/KeyboardWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void Start()
4949
_kh.KeyDown += new RawKeyEventHandler(KListener);
5050
_kh.KeyUp += new RawKeyEventHandler(KListener);
5151

52-
SharedMessagePump.Initialize();
52+
5353
Task.Factory.StartNew(() => { }).ContinueWith(x =>
5454
{
5555
_kh.Start();

EventHook/MouseWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void Start()
3636
_mh = new MouseHook();
3737
_mh.MouseAction += MListener;
3838

39-
SharedMessagePump.Initialize();
39+
4040
Task.Factory.StartNew(() => { }).ContinueWith(x =>
4141
{
4242
_mh.Start();

0 commit comments

Comments
 (0)