-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable with parameter
- Loading branch information
Bernhard Straub
committed
Feb 9, 2024
1 parent
d028998
commit 531feab
Showing
26 changed files
with
363 additions
and
128 deletions.
There are no files selected for viewing
29 changes: 14 additions & 15 deletions
29
RxBlazorLightCore/Component/RxBLServiceStateSubscriber.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace RxBlazorLightCore | ||
namespace RxBlazorLightCore; | ||
|
||
public class RxBLServiceChangeSubscriber<T> : ComponentBase where T : IRxBLService | ||
{ | ||
public class RxBLServiceChangeSubscriber<T> : ComponentBase where T : IRxBLService | ||
{ | ||
[CascadingParameter] | ||
public required T Service { get; init; } | ||
[CascadingParameter] | ||
public required T Service { get; init; } | ||
|
||
[Parameter] | ||
public double SampleRateMS { get; set; } = 100; | ||
[Parameter] | ||
public double SampleRateMS { get; set; } = 100; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
base.OnInitialized(); | ||
Service.Subscribe(cr => ServiceStateHasChanged(cr.ID, cr.Reason), SampleRateMS); | ||
} | ||
protected override void OnInitialized() | ||
{ | ||
base.OnInitialized(); | ||
Service.Subscribe(cr => ServiceStateHasChanged(cr.ID, cr.Reason), SampleRateMS); | ||
} | ||
|
||
protected virtual void ServiceStateHasChanged(Guid id, ChangeReason changeReason) | ||
{ | ||
} | ||
protected virtual void ServiceStateHasChanged(Guid id, ChangeReason changeReason) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.