Skip to content

Commit 2264594

Browse files
Merge branch 'develop' into dependabot/github_actions/gittools/actions-0.10.2
2 parents a18dae6 + ef3d2bf commit 2264594

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

.github/workflows/ci-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
env:
1515
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020

@@ -52,18 +52,18 @@ jobs:
5252
with:
5353
java-version: 11
5454
distribution: zulu
55-
- uses: actions/checkout@v3
55+
- uses: actions/checkout@v4
5656
with:
5757
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
5858
- name: Cache SonarCloud packages
59-
uses: actions/cache@v3.2.3
59+
uses: actions/cache@v3.3.2
6060
with:
6161
path: ~\sonar\cache
6262
key: ${{ runner.os }}-sonar
6363
restore-keys: ${{ runner.os }}-sonar
6464
- name: Cache SonarCloud scanner
6565
id: cache-sonar-scanner
66-
uses: actions/cache@v3.2.3
66+
uses: actions/cache@v3.3.2
6767
with:
6868
path: .\.sonar\scanner
6969
key: ${{ runner.os }}-sonar-scanner

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
env:
1414
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

src/NetCore.Utilities.Email.SendGrid.Tests/StartupExtensiosTests.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Configuration;
1+
using Microsoft.Extensions.Configuration;
32
using Microsoft.Extensions.DependencyInjection;
3+
using Microsoft.Extensions.Hosting;
44
using Microsoft.Extensions.Logging;
55
using Microsoft.Extensions.Options;
66
using Moq;
77
using Xunit;
8+
using IHostingEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
89

910
namespace ICG.NetCore.Utilities.Email.SendGrid.Tests
1011
{
@@ -46,8 +47,7 @@ public void ServiceCollection_ShouldRegisterSendGridService()
4647
var configuration = new ConfigurationBuilder()
4748
.AddJsonFile("appsettings.json")
4849
.Build();
49-
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
50-
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
50+
collection.AddSingleton(new Mock<IHostEnvironment> ().Object);
5151
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
5252
collection.AddLogging();
5353
var services = collection.BuildServiceProvider();
@@ -69,8 +69,7 @@ public void ServiceCollection_ShouldRegisterSendMessageBuilder()
6969
var configuration = new ConfigurationBuilder()
7070
.AddJsonFile("appsettings.json")
7171
.Build();
72-
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
73-
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
72+
collection.AddSingleton(new Mock<IHostEnvironment>().Object);
7473
collection.AddLogging();
7574
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
7675
var services = collection.BuildServiceProvider();
@@ -91,8 +90,7 @@ public void ServiceCollection_ShouldRegisterSendGridSender()
9190
var configuration = new ConfigurationBuilder()
9291
.AddJsonFile("appsettings.json")
9392
.Build();
94-
collection.AddSingleton(new Mock<Microsoft.Extensions.Hosting.IHostingEnvironment>().Object);
95-
collection.AddSingleton(new Mock<IHostingEnvironment>().Object);
93+
collection.AddSingleton(new Mock<IHostEnvironment>().Object);
9694
collection.UseIcgNetCoreUtilitiesEmailSendGrid(configuration);
9795
var services = collection.BuildServiceProvider();
9896

src/NetCore.Utilities.Email.SendGrid/NetCore.Utilities.Email.SendGrid.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="icg.netcore.utilities.email" Version="6.1.0" />
38-
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
37+
<PackageReference Include="icg.netcore.utilities.email" Version="6.2.0" />
38+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
3939
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
4040
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
4141
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />

src/NetCore.Utilities.Email.SendGrid/SendGridMessageBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SendGridMessage CreateMessageWithAttachment(string from, string fromName, string
4646
/// <inheritdoc cref="ISendGridMessageBuilder"/>
4747
public class SendGridMessageBuilder : ISendGridMessageBuilder
4848
{
49-
private readonly IHostingEnvironment _hostingEnvironment;
49+
private readonly IHostEnvironment _hostingEnvironment;
5050
private readonly IEmailTemplateFactory _emailTemplateFactory;
5151
private readonly SendGridServiceOptions _serviceOptions;
5252
private readonly ILogger _logger;
@@ -58,7 +58,7 @@ public class SendGridMessageBuilder : ISendGridMessageBuilder
5858
/// <param name="emailTemplateFactory"></param>
5959
/// <param name="options"></param>
6060
/// <param name="logger"></param>
61-
public SendGridMessageBuilder(IHostingEnvironment hostingEnvironment, IEmailTemplateFactory emailTemplateFactory,
61+
public SendGridMessageBuilder(IHostEnvironment hostingEnvironment, IEmailTemplateFactory emailTemplateFactory,
6262
IOptions<SendGridServiceOptions> options, ILogger<SendGridMessageBuilder> logger)
6363
{
6464
_hostingEnvironment = hostingEnvironment;

src/NetCore.Utilities.Email.SendGrid/SendGridService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Net.Mail;
43
using Microsoft.Extensions.Options;
54
using SendGrid.Helpers.Mail;
65

0 commit comments

Comments
 (0)