Skip to content

Commit c057c44

Browse files
authored
Merge pull request #5 from PandaTechAM/development
Fix faker issue
2 parents b08f781 + 84bb025 commit c057c44

File tree

18 files changed

+156
-137
lines changed

18 files changed

+156
-137
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@ on:
1313
jobs:
1414
deploy:
1515
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
dotnet-version: [ '8.x.x' ]
16+
1917
steps:
2018
- name: Checkout
2119
uses: actions/checkout@v3
2220

2321
- name: Setup .NET Core
2422
uses: actions/setup-dotnet@v3
2523
with:
26-
dotnet-version: ${{ matrix.dotnet-version }}
24+
global-json-file: global.json
2725

2826
- name: Build
2927
run: dotnet build ${{ env.PROJECT_PATH }}

Communicator.sln

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
Microsoft Visual Studio Solution File, Format Version 12.00
33
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Communicator", "src\Communicator\Communicator.csproj", "{25001943-A870-4E17-A9B9-0D190CEC819B}"
44
EndProject
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Communicator.Tests", "src\Communicator.Tests\Communicator.Tests.csproj", "{0305E58F-1C47-454C-B10B-A223F2561A85}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Communicator.Tests", "test\Communicator.Tests\Communicator.Tests.csproj", "{0305E58F-1C47-454C-B10B-A223F2561A85}"
66
EndProject
7-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Communicator.Demo", "src\Communicator.Demo\Communicator.Demo.csproj", "{5AF7F69F-4713-423A-964F-797D37E1C5B4}"
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Communicator.Demo", "test\Communicator.Demo\Communicator.Demo.csproj", "{5AF7F69F-4713-423A-964F-797D37E1C5B4}"
8+
EndProject
9+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DAE7039F-7312-451A-9598-CEAD4530B77D}"
10+
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9C906F7E-E8B8-4C2B-BE8B-E299061DC1F6}"
12+
EndProject
13+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{00745863-66E5-47D0-A25A-577E5E93E82C}"
14+
ProjectSection(SolutionItems) = preProject
15+
.github\workflows\main.yml = .github\workflows\main.yml
16+
.gitignore = .gitignore
17+
global.json = global.json
18+
Readme.md = Readme.md
19+
EndProjectSection
820
EndProject
921
Global
1022
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -25,4 +37,9 @@ Global
2537
{5AF7F69F-4713-423A-964F-797D37E1C5B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
2638
{5AF7F69F-4713-423A-964F-797D37E1C5B4}.Release|Any CPU.Build.0 = Release|Any CPU
2739
EndGlobalSection
40+
GlobalSection(NestedProjects) = preSolution
41+
{0305E58F-1C47-454C-B10B-A223F2561A85} = {9C906F7E-E8B8-4C2B-BE8B-E299061DC1F6}
42+
{5AF7F69F-4713-423A-964F-797D37E1C5B4} = {9C906F7E-E8B8-4C2B-BE8B-E299061DC1F6}
43+
{25001943-A870-4E17-A9B9-0D190CEC819B} = {DAE7039F-7312-451A-9598-CEAD4530B77D}
44+
EndGlobalSection
2845
EndGlobal

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.300",
4+
"rollForward": "latestMajor"
5+
}
6+
}

src/Communicator.Demo/appsettings.Development.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/Communicator/Communicator.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
<PackageReadmeFile>Readme.md</PackageReadmeFile>
99
<Authors>Pandatech</Authors>
1010
<Copyright>MIT</Copyright>
11-
<Version>1.0.2</Version>
11+
<Version>1.0.3</Version>
1212
<PackageId>Pandatech.Communicator</PackageId>
1313
<Title>SMS and Email Communication helper</Title>
1414
<PackageTags>Pandatech, library, Sms, Email, Messages</PackageTags>
1515
<Description>A versatile .NET library for integrating SMS and email functionalities. Supports multiple SMS providers and easy configuration through appsettings.json or web builders, ideal for efficient and reliable messaging in any application..</Description>
1616
<RepositoryUrl>https://github.com/PandaTechAM/be-lib-communicator</RepositoryUrl>
17+
<!--todo: to update this note-->
1718
<PackageReleaseNotes>InitialCommit - fake functionalities</PackageReleaseNotes>
1819
</PropertyGroup>
1920

src/Communicator/Helpers/CommunicatorConfigurator.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,14 @@ internal static class CommunicatorConfigurator
77
{
88
internal static CommunicatorOptions? ReadConfigurationOptions(IConfiguration configuration)
99
{
10-
try
11-
{
12-
var communicatorSection = configuration.GetSection("Communicator");
13-
14-
if (!communicatorSection.Exists()) return null;
15-
16-
var communicatorOptions = new CommunicatorOptions();
17-
18-
communicatorSection.Bind(communicatorOptions);
19-
20-
return communicatorOptions;
10+
var communicatorSection = configuration.GetSection("Communicator");
2111

22-
}
23-
catch (Exception exception)
24-
{
25-
throw new Exception(exception.Message);
26-
}
12+
if (!communicatorSection.Exists()) return null;
13+
14+
var communicatorOptions = new CommunicatorOptions();
15+
16+
communicatorSection.Bind(communicatorOptions);
17+
18+
return communicatorOptions;
2719
}
2820
}

src/Communicator/Helpers/OptionsValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal static void Validate(this CommunicatorOptions options)
2727

2828
var notSupportedChannels = emailConfigKeys?.Concat(smsConfigKeys ?? []).ToList();
2929

30-
if (notSupportedChannels?.Count != 0)
30+
if (notSupportedChannels is not null && notSupportedChannels.Count != 0)
3131
{
3232
throw new InvalidOperationException(
3333
$"There are unsupported Channels provided {string.Join(",", notSupportedChannels!)}.");

src/Communicator.Demo/Communicator.Demo.csproj renamed to test/Communicator.Demo/Communicator.Demo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\Communicator\Communicator.csproj" />
16+
<ProjectReference Include="..\..\src\Communicator\Communicator.csproj" />
1717
</ItemGroup>
1818

1919
</Project>

src/Communicator.Demo/MessageTemplates/EmailTemplates.cs renamed to test/Communicator.Demo/MessageTemplates/EmailTemplates.cs

File renamed without changes.

src/Communicator.Demo/MessageTemplates/SmsTemplates.cs renamed to test/Communicator.Demo/MessageTemplates/SmsTemplates.cs

File renamed without changes.

0 commit comments

Comments
 (0)