Skip to content

Commit

Permalink
Merge pull request #368 from TimeWarpEngineering/Cramer/2023-08-27/Pr…
Browse files Browse the repository at this point in the history
…ivateStore

Cramer/2023 08 27/private store
  • Loading branch information
StevenTCramer authored Aug 28, 2023
2 parents 060b0ff + 7598bd2 commit 8129d7a
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Authors>Steven T. Cramer</Authors>
<Product>Blazor State</Product>
<PackageVersion>9.0.1+7.0.400</PackageVersion>
<PackageVersion>10.0.0+7.0.400</PackageVersion>
<PackageProjectUrl>https://timewarpengineering.github.io/blazor-state/</PackageProjectUrl>
<PackageTags>TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Redux; Flux</PackageTags>
<RepositoryUrl>https://github.com/TimeWarpEngineering/blazor-state.git</RepositoryUrl>
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Migrations/Migration8-9.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
uid: BlazorState:Migration7-8.md
title: Migrate From 7.X to 8.X
uid: BlazorState:Migration8-9.md
title: Migrate From 8.X to 9.X
---

# Migration
Expand Down
12 changes: 12 additions & 0 deletions Documentation/Migrations/Migration9-10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
uid: BlazorState:Migration9-10.md
title: Migrate From 9.X to 10.X
---

# Migration

## From 9.x to 10.x

If you were implementing IBlazorStateComponent in your own component. You no longer need to implement IMediator or IStore.

If you were accessing either of these properties via the IBlazorStateComponent interface you will need to create your own interface to use that implements IBlazorStateComponent plus the properties you need.
12 changes: 12 additions & 0 deletions Documentation/ReleaseNotes/Release10.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
uid: BlazorState:Release.10.0.0.md
title: Release 10.0.0
---

## Release 10.0.0

### Breaking Changes

* IBlazorStateComponent no longer has Mediator or Store properties.

See [Migrations](xref:BlazorState:Migration9-10.md) for instructions on how to migrate from version 9.0 to 10.0.
2 changes: 1 addition & 1 deletion Documentation/ReleaseNotes/Release7.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ title: Release 7.0.0

* Blazor-State now requires dotnet 7

See [Migrations](xref:BlazorState:Migration6-7.md) for instructions on how to migrate from version 6.0.0 to 7.0.0.
See [Migrations](xref:BlazorState:Migration6-7.md) for instructions on how to migrate from version 6.0 to 7.0.
2 changes: 1 addition & 1 deletion Documentation/ReleaseNotes/Release8.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: Release 8.0.0

* Blazor-State now requires MediatR version 12

See [Migrations](xref:BlazorState:Migration7-8.md) for instructions on how to migrate from version 7.0.0 to 8.0.0.
See [Migrations](xref:BlazorState:Migration7-8.md) for instructions on how to migrate from version 7.0 to 8.0.

### Other Changes

Expand Down
2 changes: 1 addition & 1 deletion Documentation/ReleaseNotes/Release9.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: Release 9.0.0

* Blazor-State now requires MediatR version 12.1.1 which actually should have been a breaking change on MediatR.

See [Migrations](xref:BlazorState:Migration8-9.md) for instructions on how to migrate from version 7.0.0 to 8.0.0.
See [Migrations](xref:BlazorState:Migration8-9.md) for instructions on how to migrate from version 8.0 to 9.0.

### Other Changes

Expand Down
2 changes: 1 addition & 1 deletion Source/BlazorState/Components/BlazorStateComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public BlazorStateComponent()
[Parameter] public string TestId { get; set; }

[Inject] public IMediator Mediator { get; set; }
[Inject] public IStore Store { get; set; }
[Inject] private IStore Store { get; set; }

/// <summary>
/// Maintains all components that subscribe to a State.
Expand Down
16 changes: 10 additions & 6 deletions Source/BlazorState/Components/IBlazorStateComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ namespace BlazorState;
/// Minimum implementation needed for BlazorState to function
/// </summary>
/// <example>
/// public class BlazorStateComponent : BlazorComponent,
/// public class YourBaseComponent : BlazorComponent,
/// IBlazorStateComponent
/// {
/// [Inject] public IMediator Mediator { get; set; }
/// [Inject] public IStore Store { get; set; }
/// static readonly ConcurrentDictionary<string, int> s_InstanceCounts = new();

Check warning on line 12 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'The character(s) ',' cannot be used at this location.'

Check warning on line 12 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'The character(s) ',' cannot be used at this location.'

Check warning on line 12 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'The character(s) ',' cannot be used at this location.'

Check warning on line 12 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'The character(s) ',' cannot be used at this location.'
/// public BlazorStateComponent()
/// {
/// string name = GetType().Name;
/// int count = s_InstanceCounts.AddOrUpdate(name, 1, (aKey, aValue) => aValue + 1);
/// Id = $"{name}-{count}";
/// }
/// public string Id { get; }
/// public void ReRender() => StateHasChanged();
/// }
/// </example>

Check warning on line 22 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag 'example' does not match the start tag 'string'.'

Check warning on line 22 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag 'example' does not match the start tag 'string'.'

Check warning on line 22 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'End tag 'example' does not match the start tag 'string'.'

Check warning on line 22 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'End tag 'example' does not match the start tag 'string'.'
public interface IBlazorStateComponent

Check warning on line 23 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'example'.'

Check warning on line 23 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'example'.'

Check warning on line 23 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'Expected an end tag for element 'example'.'

Check warning on line 23 in Source/BlazorState/Components/IBlazorStateComponent.cs

View workflow job for this annotation

GitHub Actions / deploy

XML comment has badly formed XML -- 'Expected an end tag for element 'example'.'
{
string Id { get; }
IMediator Mediator { get; set; }
IStore Store { get; set; }


void ReRender();
}

0 comments on commit 8129d7a

Please sign in to comment.