Skip to content

Commit e6400d5

Browse files
Rename reactive global hook classes
SimpleGlobalHook is only called simple because its opposed to TaskPoolGlobalHook. There is no such connection for a SimpleReactiveGlobalHook so it was renamed to ReactiveGlobalHook. Same for R3GlobalHook.
1 parent 0f04213 commit e6400d5

File tree

11 files changed

+238
-238
lines changed

11 files changed

+238
-238
lines changed

SharpHook.R3/IR3GlobalHook.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SharpHook.R3;
77
/// All observables of objects of this interface are completed when the object is disposed, unless stated otherwise.
88
/// </remarks>
99
/// <seealso cref="IGlobalHook" />
10-
/// <seealso cref="SimpleR3GlobalHook" />
10+
/// <seealso cref="R3GlobalHook" />
1111
/// <seealso cref="R3GlobalHookAdapter" />
1212
public interface IR3GlobalHook : IDisposable
1313
{
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
namespace SharpHook.R3;
1111

1212
/// <summary>
13-
/// Represents a simple reactive R3 global hook.
13+
/// Represents a reactive R3 global hook.
1414
/// </summary>
1515
/// <seealso cref="IR3GlobalHook" />
16-
public sealed class SimpleR3GlobalHook : IR3GlobalHook
16+
public sealed class R3GlobalHook : IR3GlobalHook
1717
{
1818
private static readonly DispatchProc dispatchProc = HandleHookEvent;
19-
private static readonly ConcurrentDictionary<nint, SimpleR3GlobalHook> runningGlobalHooks = [];
19+
private static readonly ConcurrentDictionary<nint, R3GlobalHook> runningGlobalHooks = [];
2020

2121
private static int currentHookIndex = 0;
2222

@@ -41,7 +41,7 @@ public sealed class SimpleR3GlobalHook : IR3GlobalHook
4141
private readonly nint hookIndex;
4242

4343
/// <summary>
44-
/// Initializes a new instance of <see cref="SimpleR3GlobalHook" />.
44+
/// Initializes a new instance of <see cref="R3GlobalHook" />.
4545
/// </summary>
4646
/// <param name="globalHookType">The global hook type.</param>
4747
/// <param name="defaultTimeProvider">
@@ -55,7 +55,7 @@ public sealed class SimpleR3GlobalHook : IR3GlobalHook
5555
/// <see langword="true" /> if <see cref="IGlobalHook.RunAsync" /> should run the hook on a background thread.
5656
/// Otherwise, <see langword="false" />.
5757
/// </param>
58-
public SimpleR3GlobalHook(
58+
public R3GlobalHook(
5959
GlobalHookType globalHookType = GlobalHookType.All,
6060
TimeProvider? defaultTimeProvider = null,
6161
IGlobalHookProvider? globalHookProvider = null,
@@ -87,7 +87,7 @@ public SimpleR3GlobalHook(
8787
/// <summary>
8888
/// Stops the global hook if it's running.
8989
/// </summary>
90-
~SimpleR3GlobalHook() =>
90+
~R3GlobalHook() =>
9191
this.Dispose(false);
9292

9393
/// <summary>

SharpHook.R3/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using SharpHook.R3;
2323

2424
// ...
2525
26-
var hook = new SimpleR3GlobalHook();
26+
var hook = new R3GlobalHook();
2727

2828
hook.HookEnabled.Subscribe(OnHookEnabled);
2929
hook.HookDisabled.Subscribe(OnHookDisabled);
@@ -55,8 +55,8 @@ R3 global hooks are basically the same as the default global hooks and the same
5555

5656
SharpHook.R3 provides two implementations of `IR3GlobalHook`:
5757

58-
- `SharpHook.R3.SimpleR3GlobalHook`. Since we're dealing with observables, it's up to you to decide when and where to
59-
handle the events through time providers. A default time provider can be specified for all observables.
58+
- `SharpHook.R3.R3GlobalHook`. Since we're dealing with observables, it's up to you to decide when and where to handle
59+
the events through time providers. A default time provider can be specified for all observables.
6060

6161
- `SharpHook.R3.R3GlobalHookAdapter` adapts an `IGlobalHook` to `IR3GlobalHook`. All subscriptions and changes are
6262
propagated to the adapted hook. There is no default adapter from `IR3GlobalHook` to `IGlobalHook`. A default time

SharpHook.R3/SharpHook.R3.xml

Lines changed: 77 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SharpHook.Reactive/IReactiveGlobalHook.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SharpHook.Reactive;
77
/// All observables of objects of this interface are completed when the object is disposed, unless stated otherwise.
88
/// </remarks>
99
/// <seealso cref="IGlobalHook" />
10-
/// <seealso cref="SimpleReactiveGlobalHook" />
10+
/// <seealso cref="ReactiveGlobalHook" />
1111
/// <seealso cref="ReactiveGlobalHookAdapter" />
1212
public interface IReactiveGlobalHook : IDisposable
1313
{

SharpHook.Reactive/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using SharpHook.Reactive;
2323

2424
// ...
2525
26-
var hook = new SimpleReactiveGlobalHook();
26+
var hook = new ReactiveGlobalHook();
2727

2828
hook.HookEnabled.Subscribe(OnHookEnabled);
2929
hook.HookDisabled.Subscribe(OnHookDisabled);
@@ -55,8 +55,8 @@ Reactive global hooks are basically the same as the default global hooks and the
5555

5656
SharpHook.Reactive provides two implementations of `IReactiveGlobalHook`:
5757

58-
- `SharpHook.Reactive.SimpleReactiveGlobalHook`. Since we're dealing with observables, it's up to you to decide when
59-
and where to handle the events through schedulers. A default scheduler can be specified for all observables.
58+
- `SharpHook.Reactive.ReactiveGlobalHook`. Since we're dealing with observables, it's up to you to decide when and where
59+
to handle the events through schedulers. A default scheduler can be specified for all observables.
6060

6161
- `SharpHook.Reactive.ReactiveGlobalHookAdapter` adapts an `IGlobalHook` to `IReactiveGlobalHook`. All
6262
subscriptions and changes are propagated to the adapted hook. There is no default adapter from `IReactiveGlobalHook`

SharpHook.Reactive/SimpleReactiveGlobalHook.cs renamed to SharpHook.Reactive/ReactiveGlobalHook.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ namespace SharpHook.Reactive;
1010
/// Represents a simple reactive global hook.
1111
/// </summary>
1212
/// <seealso cref="IReactiveGlobalHook" />
13-
public sealed class SimpleReactiveGlobalHook : IReactiveGlobalHook
13+
public sealed class ReactiveGlobalHook : IReactiveGlobalHook
1414
{
1515
private static readonly DispatchProc dispatchProc = HandleHookEvent;
16-
private static readonly ConcurrentDictionary<nint, SimpleReactiveGlobalHook> runningGlobalHooks = [];
16+
private static readonly ConcurrentDictionary<nint, ReactiveGlobalHook> runningGlobalHooks = [];
1717

1818
private static int currentHookIndex = 0;
1919

@@ -38,7 +38,7 @@ public sealed class SimpleReactiveGlobalHook : IReactiveGlobalHook
3838
private readonly nint hookIndex;
3939

4040
/// <summary>
41-
/// Initializes a new instance of <see cref="SimpleReactiveGlobalHook" />.
41+
/// Initializes a new instance of <see cref="ReactiveGlobalHook" />.
4242
/// </summary>
4343
/// <param name="globalHookType">The global hook type.</param>
4444
/// <param name="defaultScheduler">
@@ -51,7 +51,7 @@ public sealed class SimpleReactiveGlobalHook : IReactiveGlobalHook
5151
/// <see langword="true" /> if <see cref="IGlobalHook.RunAsync" /> should run the hook on a background thread.
5252
/// Otherwise, <see langword="false" />.
5353
/// </param>
54-
public SimpleReactiveGlobalHook(
54+
public ReactiveGlobalHook(
5555
GlobalHookType globalHookType = GlobalHookType.All,
5656
IScheduler? defaultScheduler = null,
5757
IGlobalHookProvider? globalHookProvider = null,
@@ -83,7 +83,7 @@ public SimpleReactiveGlobalHook(
8383
/// <summary>
8484
/// Stops the global hook if it's running.
8585
/// </summary>
86-
~SimpleReactiveGlobalHook() =>
86+
~ReactiveGlobalHook() =>
8787
this.Dispose(false);
8888

8989
/// <summary>

0 commit comments

Comments
 (0)