-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow observer callback code to unsubscribe from action notifications (Fixes #84) * Throw exception if base.OnInitialzed not called (Fixes #82) * Remove unneeded reflection (Fixes #87) (#90) * Include ActionSubscriber tutorial in solution
- Loading branch information
Showing
16 changed files
with
392 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Fluxor.Blazor.Web | ||
{ | ||
internal class ErrorMessages | ||
{ | ||
internal const string ForgottenToCallBaseOnInitialized = | ||
"Have you forgotten to call base.OnInitialized() in your component?"; | ||
} | ||
} |
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
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
37 changes: 33 additions & 4 deletions
37
Tests/Fluxor.Blazor.Web.UnitTests/Components/FluxorComponentTests/DisposeTests.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
36 changes: 32 additions & 4 deletions
36
Tests/Fluxor.Blazor.Web.UnitTests/Components/FluxorLayoutTests/DisposeTests.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
17 changes: 17 additions & 0 deletions
17
....Blazor.Web.UnitTests/SupportFiles/FluxorComponentThatOptionallyCallsBaseOnInitialized.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Fluxor.Blazor.Web.Components; | ||
|
||
namespace Fluxor.Blazor.Web.UnitTests.SupportFiles | ||
{ | ||
public class FluxorComponentThatOptionallyCallsBaseOnInitialized : FluxorComponent | ||
{ | ||
public bool CallBaseOnInitialized; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
if (CallBaseOnInitialized) | ||
base.OnInitialized(); | ||
} | ||
|
||
public void Test_OnInitialized() => OnInitialized(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...xor.Blazor.Web.UnitTests/SupportFiles/FluxorLayoutThatOptionallyCallsBaseOnInitialized.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Fluxor.Blazor.Web.Components; | ||
|
||
namespace Fluxor.Blazor.Web.UnitTests.SupportFiles | ||
{ | ||
public class FluxorLayoutThatOptionallyCallsBaseOnInitialized : FluxorLayout | ||
{ | ||
public bool CallBaseOnInitialized; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
if (CallBaseOnInitialized) | ||
base.OnInitialized(); | ||
} | ||
|
||
public void Test_OnInitialized() => OnInitialized(); | ||
} | ||
} |
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.