Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100-preview1-014459
dotnet-version: 3.1.100-preview3-014645
- name: Build
run: dotnet build --configuration Release
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100-preview1-014459
dotnet-version: 3.1.100-preview3-014645
- name: Build
run: dotnet build --configuration Release
- name: Pack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0-preview1.19508.20" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0-preview3.19555.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Blazor.Extensions.Storage/Interfaces/ILocalStorage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace Blazor.Extensions.Storage.Interfaces
{
public interface ILocalStorage : IStorage {}
}
4 changes: 4 additions & 0 deletions src/Blazor.Extensions.Storage/Interfaces/ISessionStorage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace Blazor.Extensions.Storage.Interfaces
{
public interface ISessionStorage : IStorage {}
}
2 changes: 1 addition & 1 deletion src/Blazor.Extensions.Storage/LocalStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Blazor.Extensions.Storage
{
public class LocalStorage : IStorage
internal class LocalStorage : ILocalStorage
{
private readonly IJSRuntime runtime;

Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.Extensions.Storage/SessionStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Blazor.Extensions.Storage
{
public class SessionStorage : IStorage
internal class SessionStorage : ISessionStorage
{
private readonly IJSRuntime runtime;

Expand Down
5 changes: 3 additions & 2 deletions src/Blazor.Extensions.Storage/StorageExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Blazor.Extensions.Storage.Interfaces;
using Microsoft.Extensions.DependencyInjection;

namespace Blazor.Extensions.Storage
Expand All @@ -6,8 +7,8 @@ public static class StorageExtensions
{
public static IServiceCollection AddStorage(this IServiceCollection services)
{
return services.AddScoped<SessionStorage>()
.AddScoped<LocalStorage>();
return services.AddScoped<ISessionStorage, SessionStorage>()
.AddScoped<ILocalStorage, LocalStorage>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.1.0-preview1.19508.20" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.1.0-preview1.19508.20" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.1.0-preview1.19508.20" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.1.0-preview1.19508.20" />
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.1.0-preview3.19555.2" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.1.0-preview3.19555.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.1.0-preview3.19555.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.1.0-preview3.19555.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions test/Blazor.Extensions.Storage.Test/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@page "/"
@inject SessionStorage SessionStorage
@inject LocalStorage LocalStorage
@inject ISessionStorage SessionStorage
@inject ILocalStorage LocalStorage
@inject HttpClient Http
@inject InteropStorage InteropStorage
@inject IJSRuntime JSRuntime
@using Blazor.Extensions.Storage.Interfaces
@using Blazor.Extensions.Storage.Test.Interop

<h1>Test logging output: (See debugger log for full output)</h1>
Expand Down