Skip to content

Commit

Permalink
update docs to consume interfaces (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
celluj34 authored and galvesribeiro committed Dec 8, 2019
1 parent e963ecc commit 2eda493
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following snippet shows how to setup the storage wrapper by registering it f
public void ConfigureServices(IServiceCollection services)
{
// Add Blazor.Extensions.Storage
// Both SessionStorage and LocalStorage are registered
// Both ISessionStorage and ILocalStorage are registered
services.AddStorage();
}
```
Expand All @@ -31,8 +31,8 @@ public void ConfigureServices(IServiceCollection services)
The following snippet shows how to consume the storage API in a Blazor component.

```c#
@inject SessionStorage sessionStorage
@inject LocalStorage localStorage
@inject ISessionStorage sessionStorage
@inject ILocalStorage localStorage

@functions {
protected override async Task OnInitAsync()
Expand All @@ -50,10 +50,10 @@ If you want to consume it outside of a ```cshtml``` based component, then you ca

```c#
[Inject]
protected SessionStorage sessionStorage;
protected ISessionStorage sessionStorage;

[Inject]
protected LocalStorage localStorage;
protected ILocalStorage localStorage;

public Task LogSomething()
{
Expand Down

0 comments on commit 2eda493

Please sign in to comment.