Skip to content

Commit e8c9d6f

Browse files
Merge pull request #207 from TimeWarpEngineering/Cramer/2020-20-01/AutoRegisterStates
Auto register states
2 parents 423b176 + b6b3549 commit e8c9d6f

16 files changed

Lines changed: 234 additions & 348 deletions

File tree

BlazorState.sln

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorState.Js", "source\Bl
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2902FDFD-016E-4BF7-8B41-53D674FA53DD}"
1111
EndProject
12-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{E5536454-D05F-4C5B-92E5-AB44091503DA}"
13-
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tools", "Tools\Source\Tools.csproj", "{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}"
15-
EndProject
1612
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.Client", "Tests\TestApp\Client\TestApp.Client.csproj", "{C98290C5-6C90-4A36-A561-E96FF367727C}"
1713
EndProject
1814
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestApp", "TestApp", "{50D398DD-1384-4FF3-9415-E46F5DC2E79F}"
@@ -56,12 +52,6 @@ Global
5652
{51173297-32B7-473E-BA34-788B8E022536}.ReduxDevToolsEnabled|Any CPU.Build.0 = ReduxDevToolsEnabled|Any CPU
5753
{51173297-32B7-473E-BA34-788B8E022536}.Release|Any CPU.ActiveCfg = Release|Any CPU
5854
{51173297-32B7-473E-BA34-788B8E022536}.Release|Any CPU.Build.0 = Release|Any CPU
59-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.Debug|Any CPU.Build.0 = Debug|Any CPU
61-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.ReduxDevToolsEnabled|Any CPU.ActiveCfg = Release|Any CPU
62-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.ReduxDevToolsEnabled|Any CPU.Build.0 = Release|Any CPU
63-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.Release|Any CPU.ActiveCfg = Release|Any CPU
64-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558}.Release|Any CPU.Build.0 = Release|Any CPU
6555
{C98290C5-6C90-4A36-A561-E96FF367727C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6656
{C98290C5-6C90-4A36-A561-E96FF367727C}.Debug|Any CPU.Build.0 = Debug|Any CPU
6757
{C98290C5-6C90-4A36-A561-E96FF367727C}.ReduxDevToolsEnabled|Any CPU.ActiveCfg = ReduxDevToolsEnabled|Any CPU
@@ -109,7 +99,6 @@ Global
10999
HideSolutionNode = FALSE
110100
EndGlobalSection
111101
GlobalSection(NestedProjects) = preSolution
112-
{4F2A89FC-EBD8-43F0-8C1E-4DDCEE0B5558} = {E5536454-D05F-4C5B-92E5-AB44091503DA}
113102
{C98290C5-6C90-4A36-A561-E96FF367727C} = {50D398DD-1384-4FF3-9415-E46F5DC2E79F}
114103
{50D398DD-1384-4FF3-9415-E46F5DC2E79F} = {2902FDFD-016E-4BF7-8B41-53D674FA53DD}
115104
{9C1235D1-6695-4A82-9FC3-3CA3257E5D7C} = {50D398DD-1384-4FF3-9415-E46F5DC2E79F}

Build/BlazorStateMultiStage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ pr: none
55

66
variables:
77
Major: 3
8-
Minor: 0
9-
Patch: 1
8+
Minor: 2
9+
Patch: 0
1010
DotNetSdkVersion: 3.1.100
1111

1212
stages:

Directory.Build.props

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,27 @@
3333
<MicrosoftAspNetCoreBlazorHttpClientVersion>$(MicrosoftAspNetCoreBlazorVersion)</MicrosoftAspNetCoreBlazorHttpClientVersion>
3434
<MicrosoftAspNetCoreBlazorServerVersion>$(MicrosoftAspNetCoreBlazorVersion)</MicrosoftAspNetCoreBlazorServerVersion>
3535

36-
<MicrosoftAspNetCoreVersion>3.1.0</MicrosoftAspNetCoreVersion>
36+
<MicrosoftAspNetCoreVersion>3.1.1</MicrosoftAspNetCoreVersion>
3737
<MicrosoftAspNetCoreComponentsWebVersion>$(MicrosoftAspNetCoreVersion)</MicrosoftAspNetCoreComponentsWebVersion>
3838
<MicrosoftAspNetCoreTestHostVersion>$(MicrosoftAspNetCoreVersion)</MicrosoftAspNetCoreTestHostVersion>
3939

40-
<MicrosoftExtensionsFileProvidersEmbeddedVersion>3.1.0</MicrosoftExtensionsFileProvidersEmbeddedVersion>
41-
<MicrosoftExtensionsLoggingAbstractionsVersion>3.1.0</MicrosoftExtensionsLoggingAbstractionsVersion>
40+
<MicrosoftExtensionsFileProvidersEmbeddedVersion>$(MicrosoftAspNetCoreVersion)</MicrosoftExtensionsFileProvidersEmbeddedVersion>
41+
<MicrosoftExtensionsLoggingAbstractionsVersion>$(MicrosoftAspNetCoreVersion)</MicrosoftExtensionsLoggingAbstractionsVersion>
4242

4343
<MicrosoftSourceLinkGitHubVersion>1.0.0</MicrosoftSourceLinkGitHubVersion>
4444

4545
<AnyCloneVersion>1.0.34</AnyCloneVersion>
4646
<BlazorExtensionsLoggingVersion>0.3.0</BlazorExtensionsLoggingVersion>
47-
<CoverletMsbuildVersion>2.7.0</CoverletMsbuildVersion>
47+
<CoverletMsbuildVersion>2.8.0</CoverletMsbuildVersion>
4848
<FixieVersion>2.2.0</FixieVersion>
4949
<FixieConsoleVersion>2.1.1</FixieConsoleVersion>
50-
<MediatrExtensionsMicrosoftDependencyInjectionVersion>7.0.0</MediatrExtensionsMicrosoftDependencyInjectionVersion>
51-
<MediatrVersion>7.0.0</MediatrVersion>
52-
<MoqVersion>4.13.0</MoqVersion>
50+
<MediatrExtensionsMicrosoftDependencyInjectionVersion>8.0.0</MediatrExtensionsMicrosoftDependencyInjectionVersion>
51+
<MediatrVersion>8.0.0</MediatrVersion>
5352
<ScrutorVersion>3.1.0</ScrutorVersion>
5453
<SeleniumSupportVersion>3.141.0</SeleniumSupportVersion>
5554
<SeleniumWebDriverVersion>3.141.0</SeleniumWebDriverVersion>
5655
<ShouldlyVersion>3.0.2</ShouldlyVersion>
57-
<TypeSupportVersion>1.0.97</TypeSupportVersion>
56+
<TypeSupportVersion>1.0.100</TypeSupportVersion>
5857
</PropertyGroup>
5958

6059
<!--This is to add the SHA for the commit to your assembly InformationalVersion -->

Documentation/ReleaseNotes/Release3.0.0.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ See [Migrations](xref:BlazorState:Migration1-2.md) for how to migrate existing p
1414
## Release 3.0.1
1515

1616
Update Nuget Dev Dependencies: SourceLink, Fixie
17-
Update Nuget Production Dependency: TypeSupport now supports HashTables.
17+
Update Nuget Production Dependency: TypeSupport now supports HashTables.
18+
19+
## Release 3.1.0
20+
21+
AddBlazorState Extention method has been updated to automatically register all classes that inherit from `State<>`.
22+
Thus we no longer need to explicitly register States.
23+
24+
Updated Mediator to 8.0 https://jimmybogard.com/mediatr-8-0-released/

Documentation/Tutorial.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,14 @@ namespace Sample.Client.Features.Counter
9999
1. In the `Sample.Client` project in the `Startup.cs` file.
100100
2. Change `ConfigureServices` to configure blazor-state as follows:
101101
3. Add the required usings.
102-
4. Configure the options passed to AddBlazorState to include the assemblies to scan for Handlers.
102+
4. Configure the options passed to AddBlazorState to include the assemblies to scan for States and Handlers.
103103

104104
```csharp
105105
namespace Sample.Client
106106
{
107107
using BlazorState;
108108
using Microsoft.AspNetCore.Components.Builder;
109109
using Microsoft.Extensions.DependencyInjection;
110-
using Sample.Client.Features.Counter;
111110
using System.Reflection;
112111

113112
public class Startup
@@ -122,7 +121,6 @@ namespace Sample.Client
122121
typeof(Startup).GetTypeInfo().Assembly,
123122
}
124123
);
125-
services.AddTransient<CounterState>();
126124
}
127125

128126
public void Configure(IComponentsApplicationBuilder app)

0 commit comments

Comments
 (0)