Skip to content

Commit dc5ec56

Browse files
committed
+changelog-ignore: editorconfig
1 parent dff9fb6 commit dc5ec56

File tree

21 files changed

+6958
-6941
lines changed

21 files changed

+6958
-6941
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Contributing Guidelines
22

3-
Contributions to this package are most welcome!
3+
Contributions to this package are most welcome!
44

55
There is a test site in the solution to make working with this repository easier.

.github/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a [BackBlaze B2 Storage account](https://www.backblaze.com/cloud-storage).
99

1010
## Quick Start
11+
1112
### Prerequisites
1213

1314
1. A BackBlaze B2 account
@@ -43,6 +44,7 @@ dotnet add package Umbraco.Community.FileSystemProviders.B2
4344
}
4445
}
4546
```
47+
4648
## Health Checks
4749

4850
The package includes a suite of health checks to verify the connection to the B2 bucket.

src/.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[*]
2+
max_line_length = 200
3+
indent_style = space
4+
indent_size = 4
5+
tab_width = 4
6+
insert_final_newline = true
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
11+
# ReSharper properties
12+
resharper_braces_redundant = false
13+
resharper_csharp_indent_style = space
14+
resharper_csharp_wrap_after_declaration_lpar = true
15+
resharper_csharp_wrap_parameters_style = chop_if_long
16+
resharper_instance_members_qualify_declared_in = base_class
17+
resharper_method_or_operator_body = expression_body
18+
resharper_place_expr_method_on_single_line = true
19+
resharper_braces_for_ifelse = required

src/TestSite.10/Composer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ public class Composer : IComposer
77
public void Compose(IUmbracoBuilder builder)
88
{
99
}
10-
}
10+
}

src/TestSite.10/Program.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
namespace TestSite.Ten
1+
namespace TestSite.Ten;
2+
3+
public class Program
24
{
3-
public class Program
4-
{
5-
public static void Main(string[] args)
6-
=> CreateHostBuilder(args)
7-
.Build()
8-
.Run();
5+
public static void Main(string[] args)
6+
=> CreateHostBuilder(args)
7+
.Build()
8+
.Run();
99

10-
public static IHostBuilder CreateHostBuilder(string[] args) =>
11-
Host.CreateDefaultBuilder(args)
12-
.ConfigureUmbracoDefaults()
13-
.ConfigureWebHostDefaults(webBuilder =>
14-
{
15-
webBuilder.UseStaticWebAssets();
16-
webBuilder.UseStartup<Startup>();
17-
});
18-
}
10+
public static IHostBuilder CreateHostBuilder(string[] args) =>
11+
Host.CreateDefaultBuilder(args)
12+
.ConfigureUmbracoDefaults()
13+
.ConfigureWebHostDefaults(webBuilder =>
14+
{
15+
webBuilder.UseStaticWebAssets();
16+
webBuilder.UseStartup<Startup>();
17+
});
1918
}

src/TestSite.10/Startup.cs

Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,64 @@
1-
namespace TestSite.Ten
1+
namespace TestSite.Ten;
2+
3+
public class Startup
24
{
3-
public class Startup
5+
private readonly IConfiguration _config;
6+
private readonly IWebHostEnvironment _env;
7+
8+
/// <summary>
9+
/// Initializes a new instance of the <see cref="Startup" /> class.
10+
/// </summary>
11+
/// <param name="webHostEnvironment">The web hosting environment.</param>
12+
/// <param name="config">The configuration.</param>
13+
/// <remarks>
14+
/// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337.
15+
/// </remarks>
16+
public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config)
417
{
5-
private readonly IWebHostEnvironment _env;
6-
private readonly IConfiguration _config;
18+
_env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment));
19+
_config = config ?? throw new ArgumentNullException(nameof(config));
20+
}
721

8-
/// <summary>
9-
/// Initializes a new instance of the <see cref="Startup" /> class.
10-
/// </summary>
11-
/// <param name="webHostEnvironment">The web hosting environment.</param>
12-
/// <param name="config">The configuration.</param>
13-
/// <remarks>
14-
/// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337.
15-
/// </remarks>
16-
public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config)
17-
{
18-
_env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment));
19-
_config = config ?? throw new ArgumentNullException(nameof(config));
20-
}
22+
/// <summary>
23+
/// Configures the services.
24+
/// </summary>
25+
/// <param name="services">The services.</param>
26+
/// <remarks>
27+
/// This method gets called by the runtime. Use this method to add services to the container.
28+
/// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940.
29+
/// </remarks>
30+
public void ConfigureServices(IServiceCollection services)
31+
{
32+
services.AddUmbraco(_env, _config)
33+
.AddBackOffice()
34+
.AddWebsite()
35+
.AddComposers()
36+
.Build();
37+
}
2138

22-
/// <summary>
23-
/// Configures the services.
24-
/// </summary>
25-
/// <param name="services">The services.</param>
26-
/// <remarks>
27-
/// This method gets called by the runtime. Use this method to add services to the container.
28-
/// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940.
29-
/// </remarks>
30-
public void ConfigureServices(IServiceCollection services)
39+
/// <summary>
40+
/// Configures the application.
41+
/// </summary>
42+
/// <param name="app">The application builder.</param>
43+
/// <param name="env">The web hosting environment.</param>
44+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
45+
{
46+
if (env.IsDevelopment())
3147
{
32-
services.AddUmbraco(_env, _config)
33-
.AddBackOffice()
34-
.AddWebsite()
35-
.AddComposers()
36-
.Build();
48+
app.UseDeveloperExceptionPage();
3749
}
3850

39-
/// <summary>
40-
/// Configures the application.
41-
/// </summary>
42-
/// <param name="app">The application builder.</param>
43-
/// <param name="env">The web hosting environment.</param>
44-
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
45-
{
46-
if (env.IsDevelopment())
51+
app.UseUmbraco()
52+
.WithMiddleware(u =>
4753
{
48-
app.UseDeveloperExceptionPage();
49-
}
50-
51-
app.UseUmbraco()
52-
.WithMiddleware(u =>
53-
{
54-
u.UseBackOffice();
55-
u.UseWebsite();
56-
})
57-
.WithEndpoints(u =>
58-
{
59-
u.UseInstallerEndpoints();
60-
u.UseBackOfficeEndpoints();
61-
u.UseWebsiteEndpoints();
62-
});
63-
}
54+
u.UseBackOffice();
55+
u.UseWebsite();
56+
})
57+
.WithEndpoints(u =>
58+
{
59+
u.UseInstallerEndpoints();
60+
u.UseBackOfficeEndpoints();
61+
u.UseWebsiteEndpoints();
62+
});
6463
}
6564
}

src/TestSite.10/TestSite.10.csproj

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
4-
<ImplicitUsings>enable</ImplicitUsings>
5-
<Nullable>enable</Nullable>
6-
<RootNamespace>TestSite.Ten</RootNamespace>
7-
</PropertyGroup>
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
<RootNamespace>TestSite.Ten</RootNamespace>
7+
</PropertyGroup>
88

9-
<ItemGroup>
10-
<PackageReference Include="Umbraco.Cms" Version="10.4.0" />
11-
<PackageReference Include="uSync" Version="10.7.3" />
12-
</ItemGroup>
9+
<ItemGroup>
10+
<PackageReference Include="Umbraco.Cms" Version="10.4.0"/>
11+
<PackageReference Include="uSync" Version="10.7.3"/>
12+
</ItemGroup>
1313

14-
<ItemGroup>
15-
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
16-
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
17-
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
18-
</ItemGroup>
14+
<ItemGroup>
15+
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
16+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9"/>
17+
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))"/>
18+
</ItemGroup>
1919

20-
<ItemGroup>
21-
<Content Update="appsettings.*.json">
22-
<DependentUpon>appsettings.json</DependentUpon>
23-
</Content>
24-
</ItemGroup>
20+
<ItemGroup>
21+
<Content Update="appsettings.*.json">
22+
<DependentUpon>appsettings.json</DependentUpon>
23+
</Content>
24+
</ItemGroup>
2525

26-
<ItemGroup>
27-
<ProjectReference Include="..\Umbraco.Community.FileSystemProviders.B2\Umbraco.Community.FileSystemProviders.B2.csproj" />
28-
</ItemGroup>
29-
30-
<PropertyGroup>
31-
<!-- Razor files are needed for the backoffice to work correctly -->
32-
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
33-
</PropertyGroup>
26+
<ItemGroup>
27+
<ProjectReference Include="..\Umbraco.Community.FileSystemProviders.B2\Umbraco.Community.FileSystemProviders.B2.csproj"/>
28+
</ItemGroup>
3429

35-
<PropertyGroup>
36-
<!-- Remove RazorCompileOnBuild and RazorCompileOnPublish when not using ModelsMode InMemoryAuto -->
37-
<RazorCompileOnBuild>false</RazorCompileOnBuild>
38-
<RazorCompileOnPublish>false</RazorCompileOnPublish>
39-
</PropertyGroup>
30+
<PropertyGroup>
31+
<!-- Razor files are needed for the backoffice to work correctly -->
32+
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
33+
</PropertyGroup>
34+
35+
<PropertyGroup>
36+
<!-- Remove RazorCompileOnBuild and RazorCompileOnPublish when not using ModelsMode InMemoryAuto -->
37+
<RazorCompileOnBuild>false</RazorCompileOnBuild>
38+
<RazorCompileOnPublish>false</RazorCompileOnPublish>
39+
</PropertyGroup>
4040

4141
</Project>

src/TestSite.12/Composer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ public class Composer : IComposer
77
public void Compose(IUmbracoBuilder builder)
88
{
99
}
10-
}
10+
}

src/TestSite.12/Program.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
namespace TestSite.Twelve
1+
namespace TestSite.Twelve;
2+
3+
public class Program
24
{
3-
public class Program
4-
{
5-
public static void Main(string[] args)
6-
=> CreateHostBuilder(args)
7-
.Build()
8-
.Run();
5+
public static void Main(string[] args)
6+
=> CreateHostBuilder(args)
7+
.Build()
8+
.Run();
99

10-
public static IHostBuilder CreateHostBuilder(string[] args) =>
11-
Host.CreateDefaultBuilder(args)
12-
.ConfigureUmbracoDefaults()
13-
.ConfigureWebHostDefaults(webBuilder =>
14-
{
15-
webBuilder.UseStaticWebAssets();
16-
webBuilder.UseStartup<Startup>();
17-
});
18-
}
10+
public static IHostBuilder CreateHostBuilder(string[] args) =>
11+
Host.CreateDefaultBuilder(args)
12+
.ConfigureUmbracoDefaults()
13+
.ConfigureWebHostDefaults(webBuilder =>
14+
{
15+
webBuilder.UseStaticWebAssets();
16+
webBuilder.UseStartup<Startup>();
17+
});
1918
}

0 commit comments

Comments
 (0)