Skip to content

Commit 5fd8d1b

Browse files
committed
Migrated to .NET6
1 parent 1dbeef2 commit 5fd8d1b

File tree

10 files changed

+537
-589
lines changed

10 files changed

+537
-589
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.cs]
2+
csharp_style_namespace_declarations = file_scoped:warning
File renamed without changes.

src/Cofoundry.Plugins.Azure/AzureBlobFileService.cs

Lines changed: 155 additions & 175 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
using Cofoundry.Core.DependencyInjection;
22
using Cofoundry.Domain.Data;
33
using Cofoundry.Plugins.Azure.Internal;
4-
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
94

10-
namespace Cofoundry.Plugins.Azure
5+
namespace Cofoundry.Plugins.Azure;
6+
7+
public class AzureDependencyRegistration : IDependencyRegistration
118
{
12-
public class AzureDependencyRegistration : IDependencyRegistration
9+
public void Register(IContainerRegister container)
1310
{
14-
public void Register(IContainerRegister container)
11+
if (container.Configuration.IsAzurePluginEnabled())
1512
{
16-
if (container.Configuration.IsAzurePluginEnabled())
17-
{
18-
var overrideOptions = RegistrationOptions.Override();
13+
var overrideOptions = RegistrationOptions.Override();
1914

20-
container
21-
.Register<IFileStoreService, AzureBlobFileService>(overrideOptions)
22-
;
23-
}
15+
container
16+
.Register<IFileStoreService, AzureBlobFileService>(overrideOptions)
17+
;
2418
}
2519
}
2620
}
Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using Cofoundry.Core.Configuration;
1+
using Cofoundry.Core.Configuration;
72

8-
namespace Cofoundry.Plugins.Azure
3+
namespace Cofoundry.Plugins.Azure;
4+
5+
public class AzureSettings : PluginConfigurationSettingsBase
96
{
10-
public class AzureSettings : PluginConfigurationSettingsBase
11-
{
12-
/// <summary>
13-
/// Indicates whether the plugin should be disabled, which means services
14-
/// will not be bootstrapped. Disable this in dev when you want to run using
15-
/// the standard non-cloud services. Defaults to false.
16-
/// </summary>
17-
public bool Disabled { get; set; }
7+
/// <summary>
8+
/// Indicates whether the plugin should be disabled, which means services
9+
/// will not be bootstrapped. Disable this in dev when you want to run using
10+
/// the standard non-cloud services. Defaults to false.
11+
/// </summary>
12+
public bool Disabled { get; set; }
1813

19-
/// <summary>
20-
/// The connection string to use when accessing files in blob storage
21-
/// </summary>
22-
public string BlobStorageConnectionString { get; set; }
23-
}
14+
/// <summary>
15+
/// The connection string to use when accessing files in blob storage
16+
/// </summary>
17+
public string BlobStorageConnectionString { get; set; }
2418
}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
6-
<PackageId>Cofoundry.Plugins.Azure</PackageId>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
7+
<PackageId>Cofoundry.Plugins.Azure</PackageId>
78
<Description>Services, abstractions and helpers for running in an Azure environment.</Description>
89
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
910
<Copyright>Copyright © Cofoundry.org</Copyright>
1011
<PackageTags>Cofoundry Azure</PackageTags>
1112
</PropertyGroup>
1213

1314
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
14-
<DocumentationFile>bin\Release\netcoreapp3.1\Cofoundry.Plugins.Azure.xml</DocumentationFile>
15+
<DocumentationFile>bin\Release\net6.0\Cofoundry.Plugins.Azure.xml</DocumentationFile>
1516
<NoWarn>1701;1702;1705;1591</NoWarn>
1617
</PropertyGroup>
1718

1819
<ItemGroup>
1920
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.0" />
20-
<PackageReference Include="Cofoundry.Domain" Version="0.10.3" />
21+
<PackageReference Include="Cofoundry.Domain" Version="0.10.4-ci0006" />
2122
</ItemGroup>
2223

2324
</Project>
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
using Cofoundry.Core.DependencyInjection;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Text;
52

6-
namespace Cofoundry.Plugins.Azure
3+
namespace Cofoundry.Plugins.Azure;
4+
5+
public static class IContainerRegisterExtensions
76
{
8-
public static class IContainerRegisterExtensions
7+
/// <summary>
8+
/// Indicates whether the Cofoundry.Plugins.Azure plugin has been
9+
/// disabled via config settings.
10+
/// </summary>
11+
/// <returns>True if the azure plugin is disabled; otherwise false.</returns>
12+
public static bool IsAzurePluginEnabled(this IContainerConfigurationHelper helper)
913
{
10-
/// <summary>
11-
/// Indicates whether the Cofoundry.Plugins.Azure plugin has been
12-
/// disabled via config settings.
13-
/// </summary>
14-
/// <returns>True if the azure plugin is disabled; otherwise false.</returns>
15-
public static bool IsAzurePluginEnabled(this IContainerConfigurationHelper helper)
16-
{
17-
return !helper.GetValue<bool>("Cofoundry:Plugins:Azure:Disabled");
18-
}
14+
return !helper.GetValue<bool>("Cofoundry:Plugins:Azure:Disabled");
1915
}
2016
}

0 commit comments

Comments
 (0)