Skip to content

Commit c18c0c0

Browse files
committed
More renaming
1 parent 63e635c commit c18c0c0

14 files changed

Lines changed: 175 additions & 175 deletions

File tree

.github/workflows/static.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Simple workflow for deploying static content to GitHub Pages
22
name: Deploy static content to Pages
33
env:
4-
PUBLISH_DIR: Demo/ExpireStorage.Demo/bin/Release/net10.0/publish/wwwroot
4+
PUBLISH_DIR: Demo/OfflineSupport.Demo/bin/Release/net10.0/publish/wwwroot
55

66
on:
77
# Runs on pushes targeting the default branch for the app's folder path
@@ -45,13 +45,13 @@ jobs:
4545
dotnet-version: '10.0.x'
4646

4747
- name: Publish app
48-
run: dotnet publish Demo/ExpireStorage.Demo -c Release /p:BlazorEnableCompression=false
48+
run: dotnet publish Demo/OfflineSupport.Demo -c Release /p:BlazorEnableCompression=false
4949

5050
- name: Rewrite base href
5151
uses: SteveSandersonMS/ghaction-rewrite-base-href@5b54862a8831e012d4f1a8b2660894415fdde8ec # v1.1.0
5252
with:
5353
html_path: ${{ env.PUBLISH_DIR }}/index.html
54-
base_href: /Drogecode.Blazor.ExpireStorage/
54+
base_href: /Drogecode.Blazor.OfflineSupport/
5555

5656
- name: Setup Pages
5757
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

Demo/OfflineSupport.Demo/Layout/MainLayout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<MudLayout>
99
<MudAppBar Elevation="1">
10-
<MudText Typo="Typo.h6" Class="ml-2">ExpireStorage</MudText>
10+
<MudText Typo="Typo.h6" Class="ml-2">OfflineSupport</MudText>
1111
<MudSpacer />
1212
<Theming MudThemeProvider="@_mudThemeProvider" @bind-IsDarkMode="_isDarkMode" />
1313
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Href="https://github.com/Drogecode/Drogecode.Blazor.OfflineSupport" Target="_blank" />

Demo/OfflineSupport.Demo/Pages/Home.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PageTitle>Demo ExireStorage NuGet</PageTitle>
55

6-
<MudText Typo="Typo.h3" GutterBottom="true">Welcome and lets play with ExpireStorage!</MudText>
6+
<MudText Typo="Typo.h3" GutterBottom="true">Welcome and lets play with OfflineSupport!</MudText>
77

88
<MudText>You can play a bit with the settings in the form below.</MudText>
99
<MudText>Remember your key and close and open the browser to see the workings</MudText>

Demo/OfflineSupport.Demo/Pages/Home.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace OfflineSupport.Demo.Pages;
88

99
public sealed partial class Home : IDisposable
1010
{
11-
[Inject, NotNull] private IExpireStorageService? StorageService { get; set; }
11+
[Inject, NotNull] private IOfflineSupportService? StorageService { get; set; }
1212

1313
private readonly CancellationTokenSource _cls = new();
1414
private DemoModelForStorage _model = new();
@@ -23,8 +23,8 @@ public sealed partial class Home : IDisposable
2323

2424
protected override void OnInitialized()
2525
{
26-
ExpireStorageService.LogToConsole = true;
27-
ExpireStorageService.IsOfflineChanged += OfflineChanged;
26+
OfflineSupportService.LogToConsole = true;
27+
OfflineSupportService.IsOfflineChanged += OfflineChanged;
2828
}
2929

3030
private async Task Save()

Demo/OfflineSupport.Demo/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
builder.Services.AddScoped<ILocalUserSettingService, LocalUserSettingService>();
1616

1717
// Adds expire storage services
18-
builder.Services.AddExpireStorage();
18+
builder.Services.AddOfflineSupport();
1919

2020
await builder.Build().RunAsync();

Demo/OfflineSupport.Demo/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<head>
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>ExpireStorage Demo</title>
7+
<title>OfflineSupport Demo</title>
88
<base href="/" />
99
<link rel="preload" id="webassembly" />
1010
<link rel="stylesheet" href="_content/MudBlazor/MudBlazor.min.css" />
1111
<link rel="stylesheet" href="css/app.css" />
1212
<link rel="icon" type="image/png" href="favicon.png" />
13-
<link href="ExpireStorage.Demo.styles.css" rel="stylesheet" />
13+
<link href="OfflineSupport.Demo.styles.css" rel="stylesheet" />
1414
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
1515
<link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />
1616
<script type="importmap"></script>

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
[![Nuget version](https://img.shields.io/nuget/v/Drogecode.Blazor.ExpireStorage.svg?logo=nuget)](https://www.nuget.org/packages/Drogecode.Blazor.ExpireStorage/)
1+
[![Nuget version](https://img.shields.io/nuget/v/Drogecode.Blazor.OfflineSupport.svg?logo=nuget)](https://www.nuget.org/packages/Drogecode.Blazor.OfflineSupport/)
22

3-
# Drogecode.Blazor.ExpireStorage
3+
# Drogecode.Blazor.OfflineSupport
44

55
Store api responses in localstorage and sessionstorage.
66

77
Configure if the api should be called or the cached value will be returned if available.
88

99
Ideal for Blazor WebAssembly PWA's, that should work offline.
1010

11-
[Deme site](https://drogecode.github.io/Drogecode.Blazor.ExpireStorage/)
11+
[Deme site](https://drogecode.github.io/Drogecode.Blazor.OfflineSupport/)
1212

1313
## Installing
1414

1515
To install the package, add the following line to the csproj file. Replacing x.x.x with the latest version number (found at the top of this file):
1616

1717
```
18-
<PackageReference Include="Drogecode.Blazor.ExpireStorage" Version="x.x.x" />
18+
<PackageReference Include="Drogecode.Blazor.OfflineSupport" Version="x.x.x" />
1919
```
2020

2121
You can also install via the .NET CLI with the following command:
2222

2323
```
24-
dotnet add package Drogecode.Blazor.ExpireStorage
24+
dotnet add package Drogecode.Blazor.OfflineSupport
2525
```
2626

2727
If you're using Visual Studio you can also install via the built in NuGet package manager.
@@ -33,7 +33,7 @@ You will need to register the expire storage services with the service collectio
3333
```c#
3434
public void ConfigureServices(IServiceCollection services)
3535
{
36-
services.AddExpireStorage();
36+
services.AddOfflineSupport();
3737
}
3838
```
3939

@@ -45,7 +45,7 @@ public static async Task Main(string[] args)
4545
var builder = WebAssemblyHostBuilder.CreateDefault(args);
4646
builder.RootComponents.Add<App>("app");
4747

48-
builder.Services.AddExpireStorage();
48+
builder.Services.AddOfflineSupport();
4949

5050
await builder.Build().RunAsync();
5151
}
@@ -66,7 +66,7 @@ public static async Task Main(string[] args)
6666
### Example
6767

6868
```c#
69-
@inject Drogecode.Blazor.ExpireStorage.IExpireStorageService storageService
69+
@inject Drogecode.Blazor.OfflineSupport.IOfflineSupportService storageService
7070

7171
@code {
7272

@@ -107,29 +107,29 @@ You can give optional settings to the CachedRequest object.
107107

108108
On, for example, MainLayout.razor.cs, you can set the Postfix to be used for all requests. This is useful if you have multiple users using the same app from the same browser.
109109

110-
`ExpireStorageService.Postfix = userId.ToString();`
110+
`OfflineSupportService.Postfix = userId.ToString();`
111111

112112
#### IsOffline
113113

114-
ExpireStorageService knows two properties to monitor if the app is offline.
114+
OfflineSupportService knows two properties to monitor if the app is offline.
115115

116116
IsOffline is true when the last request had an `HttpRequestException`, after a successful request IsOffline will be false.
117117

118-
`ExpireStorageService.IsOffline` and `ExpireStorageService.IsOfflineChanged`
118+
`OfflineSupportService.IsOffline` and `OfflineSupportService.IsOfflineChanged`
119119

120120
#### LogToConsole
121121

122-
ExpireStorageService can log to the console if you want to see what is happening, *default: false*.
122+
OfflineSupportService can log to the console if you want to see what is happening, *default: false*.
123123

124-
`ExpireStorageService.LogToConsole = true;`
124+
`OfflineSupportService.LogToConsole = true;`
125125

126126
### ICacheableResponse
127127

128128
If a response object implements ICacheableResponse, the HandledBy property will be set to `HandledBy.Cache` if the result was retrieved from cache and to `HandledBy.Default` if the default provided by
129129
the caller was used.
130130

131131
```c#
132-
using Drogecode.Blazor.ExpireStorage;
132+
using Drogecode.Blazor.OfflineSupport;
133133
public class YourObjectResponse : ICacheableResponse
134134
{
135135
...

Src/Drogecode.Blazor.OfflineSupport/Drogecode.Blazor.OfflineSupport.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<Version>1.0.2</Version>
8-
<Title>Drogecode.Blazor.ExpireStorage</Title>
7+
<Version>1.0.3</Version>
8+
<Title>Drogecode.Blazor.OfflineSupport</Title>
99
<Authors>Taco Droogers</Authors>
10-
<PackageProjectUrl>https://github.com/Drogecode/Drogecode.Blazor.ExpireStorage</PackageProjectUrl>
11-
<RepositoryUrl>https://github.com/Drogecode/Drogecode.Blazor.ExpireStorage</RepositoryUrl>
12-
<Description>Adds a wrapper on top of Blazored.LocalStorage and Blazored.SessionStorage to expire items from localstorage and sessionstorage after a specified time.</Description>
10+
<PackageProjectUrl>https://github.com/Drogecode/Drogecode.Blazor.OfflineSupport</PackageProjectUrl>
11+
<RepositoryUrl>https://github.com/Drogecode/Drogecode.Blazor.OfflineSupport</RepositoryUrl>
12+
<Description>Saves api responses in the localstorage or the sessionstorage for offline support.</Description>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -19,11 +19,11 @@
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
22-
<DocumentationFile>bin\Debug\Drogecode.Blazor.ExpireStorage.xml</DocumentationFile>
22+
<DocumentationFile>bin\Debug\Drogecode.Blazor.OfflineSupport.xml</DocumentationFile>
2323
</PropertyGroup>
2424

2525
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
26-
<DocumentationFile>bin\Release\Drogecode.Blazor.ExpireStorage.xml</DocumentationFile>
26+
<DocumentationFile>bin\Release\Drogecode.Blazor.OfflineSupport.xml</DocumentationFile>
2727
</PropertyGroup>
2828

2929
<ItemGroup>

Src/Drogecode.Blazor.OfflineSupport/Helpers/BuilderHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ namespace Drogecode.Blazor.OfflineSupport;
55

66
public static class BuilderHelper
77
{
8-
public static IServiceCollection AddExpireStorage(this IServiceCollection services)
8+
public static IServiceCollection AddOfflineSupport(this IServiceCollection services)
99
{
1010
services.TryAddScoped<ILocalStorageExpireService, LocalStorageExpireService>();
1111
services.TryAddScoped<ISessionExpireService, SessionExpireService>();
12-
services.TryAddScoped<IExpireStorageService, ExpireStorageService>();
12+
services.TryAddScoped<IOfflineSupportService, OfflineSupportService>();
1313
services.TryAddScoped<IJsStorageService, JsStorageService>();
1414
return services;
1515
}
1616

17-
public static IServiceCollection AddExpireStorageAsSingleton(this IServiceCollection services)
17+
public static IServiceCollection AddOfflineSupportAsSingleton(this IServiceCollection services)
1818
{
1919
services.TryAddSingleton<ILocalStorageExpireService, LocalStorageExpireService>();
2020
services.TryAddSingleton<ISessionExpireService, SessionExpireService>();
21-
services.TryAddSingleton<IExpireStorageService, ExpireStorageService>();
21+
services.TryAddSingleton<IOfflineSupportService, OfflineSupportService>();
2222
services.TryAddSingleton<IJsStorageService, JsStorageService>();
2323
return services;
2424
}

Src/Drogecode.Blazor.OfflineSupport/Interfaces/IExpireStorageService.cs renamed to Src/Drogecode.Blazor.OfflineSupport/Interfaces/IOfflineSupportService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Drogecode.Blazor.OfflineSupport;
44

5-
public interface IExpireStorageService
5+
public interface IOfflineSupportService
66
{
77
/// <summary>
88
/// Caches the request and returns the response.

0 commit comments

Comments
 (0)