Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
34e0e67
Initial version of EmailAddress
GillesTourreau Sep 25, 2025
b2aa770
Add the CI support.
GillesTourreau Sep 25, 2025
a9326ba
Fix README.
GillesTourreau Sep 25, 2025
1c6a77a
Update github-actions-release.yml
GillesTourreau Sep 25, 2025
1e26575
Fix README.
GillesTourreau Sep 25, 2025
09be019
Merge branch 'releases/v1.0.0' of https://github.com/PosInformatique/…
GillesTourreau Sep 25, 2025
3a17141
Add the PosInformatique.Foundations.EmailAddresses.Json package imple…
GillesTourreau Sep 26, 2025
290f72e
Put .NET version property in common and fix namespace.
GillesTourreau Sep 26, 2025
6c8b2c3
Add EmailAddresses.EntityFramework package.
GillesTourreau Sep 26, 2025
52bee76
Add FluentValidations extensions.
GillesTourreau Sep 26, 2025
4adcc8f
Fix unit tests.
GillesTourreau Sep 26, 2025
4e131f7
Fix README for FluentValidation package.
GillesTourreau Sep 27, 2025
38c0e97
Fix IsEmailAddress() for nullable property.
GillesTourreau Sep 27, 2025
6ab0732
Fix CI to raise error if there is some warnings.
GillesTourreau Sep 27, 2025
5be1fc7
Fix CI.
GillesTourreau Sep 27, 2025
14f9ae9
Disable warnings to error in the CI.
GillesTourreau Sep 27, 2025
1b26b6e
Add the People core library.
GillesTourreau Oct 9, 2025
352c3cc
Add missing unit tests for EmailAddress.FluentValidation.
GillesTourreau Oct 9, 2025
0c170b4
Fix README for EmailAddresses
GillesTourreau Oct 9, 2025
188a151
Add the People.EntityFramework NuGet package.
GillesTourreau Oct 9, 2025
738891c
Add the People.FluentValidation NuGet package.
GillesTourreau Oct 9, 2025
9a9ff66
Updates the README.
GillesTourreau Oct 9, 2025
73e5719
Upgrade the NuGet packages.
GillesTourreau Oct 9, 2025
0a41c51
Add the People.Json and People.DataAnnotations packages.
GillesTourreau Oct 10, 2025
4118db8
Add the People.FluentAssertions package.
GillesTourreau Oct 10, 2025
e6a876c
Migrate the solution to .slnx
GillesTourreau Oct 10, 2025
f22449d
Add the global.json
GillesTourreau Oct 10, 2025
116927e
Fix the CI / Release GitHub actions.
GillesTourreau Oct 10, 2025
5b08718
Add SonarAnalyers package.
GillesTourreau Oct 23, 2025
aa2248a
Upgrade NuGet packages.
GillesTourreau Oct 23, 2025
62c2555
Upgrade NuGet packages.
GillesTourreau Nov 7, 2025
515a33e
Remove new line at the end of file.
GillesTourreau Nov 10, 2025
dc96f17
Exclude the CHANGELOG.md in the packaging of the NuGet packages.
GillesTourreau Nov 13, 2025
5215731
Upgrade NuGet packages
GillesTourreau Nov 14, 2025
11bff49
Integrate partial source code of MailKit.
GillesTourreau Nov 14, 2025
e20d4e2
Add MediaTypes library.
GillesTourreau Nov 14, 2025
ab6e9f3
Add the MediaTypes.Json library.
GillesTourreau Nov 14, 2025
de861a2
Add the MediaTypes.EntityFramework library.
GillesTourreau Nov 14, 2025
9d1bfe2
Add the AutoCad MIME type.
GillesTourreau Nov 14, 2025
a3386e3
Add emailing implementation.
GillesTourreau Nov 14, 2025
15db20c
Fix warnings.
GillesTourreau Nov 15, 2025
e085f03
Add the Emailing.Templates.Razor package.
GillesTourreau Nov 15, 2025
9948ded
Add PhoneNumbers implementation.
GillesTourreau Nov 16, 2025
43884bf
Add the PhoneNumbers.Json package.
GillesTourreau Nov 16, 2025
ae6850e
Reverse README between EF et MediaTypes
GillesTourreau Nov 16, 2025
8c6661b
Add the PhoneNumbers.EntityFramework package.
GillesTourreau Nov 16, 2025
901496d
Add the PhoneNumber.FluentValidation package.
GillesTourreau Nov 16, 2025
46fb9ec
Add the Text.Templating.Scriban implementation.
GillesTourreau Nov 16, 2025
3408cad
Centralize .NET version.
GillesTourreau Nov 16, 2025
f24c802
Upgrade PosInformatique.Moq.Analyzers.
GillesTourreau Nov 16, 2025
0c7fa5a
IParsable for EmailAddress is now implemented explictly.
GillesTourreau Nov 16, 2025
da70244
IParsable for MimeType is now implemented explictly.
GillesTourreau Nov 16, 2025
85d12c9
For MimeType implementation of the IFormattable interfacE.
GillesTourreau Nov 16, 2025
e4b9673
Renames EmailAddressJsonSerializerOptionsExtensions to EmailAddresses…
GillesTourreau Nov 16, 2025
47cbf6b
Add missing unit tests for PhoneNumber.TryParse() with null argument.
GillesTourreau Nov 16, 2025
8d5a0c6
Add missing unit tests
GillesTourreau Nov 16, 2025
22a1a60
Renames the EmailAddressValidatorExtensionsTest to EmailAddressesVali…
GillesTourreau Nov 16, 2025
eb5b17d
Fix the asynchronous check of the ThrowExactyAsync<>().
GillesTourreau Nov 16, 2025
67617f5
Fix unit tests.
GillesTourreau Nov 16, 2025
d719a0f
Add the package Emailing.Graph.
GillesTourreau Nov 16, 2025
e4d66f8
Remove the base class EmailModel.
GillesTourreau Nov 16, 2025
c22bf0c
Fix warnings.
GillesTourreau Nov 16, 2025
c6546e9
Change the Emailing provider registration namespace to Microsoft.Exte…
GillesTourreau Nov 16, 2025
04c77b6
Add warning about AddEmailing() registration scope.
GillesTourreau Nov 16, 2025
3b7ef2b
Add the UseRazorEmailTemplates() extension method.
GillesTourreau Nov 16, 2025
578c04b
Add code coverage settings.
GillesTourreau Nov 18, 2025
19757c9
Reduce the dependency of the external libraries and add the support o…
GillesTourreau Nov 18, 2025
4af1b9b
Fix CI.
GillesTourreau Nov 18, 2025
a395e8f
Remove the name of the trx file.
GillesTourreau Nov 18, 2025
4d3163e
Add the support of the Importance for the e-mail to send with Emailin…
GillesTourreau Nov 18, 2025
2a39dc9
Change Microsoft.Graph version.
GillesTourreau Nov 18, 2025
b183b51
Fix a bug in the EmailManager.
GillesTourreau Nov 19, 2025
42e0068
Fix warnings.
GillesTourreau Nov 19, 2025
15d6850
Add the skip-duplicated option when publishing on NuGet.
GillesTourreau Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
root = true

[*]
charset = utf-8-bom
insert_final_newline = false
trim_trailing_whitespace = true

# Markdown specific settings
[*.md]
indent_style = space
indent_size = 2

# YAML specific settings
[*.yaml]
indent_style = space
indent_size = 2

# x.proj specific settings
[*.{csproj,props}]
indent_style = space
indent_size = 2

[*.{cs,vb}]

#### Naming styles ####
tab_width = 4
indent_size = 4
end_of_line = crlf

csharp_style_prefer_primary_constructors = false:suggestion
csharp_using_directive_placement = inside_namespace:warning

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_namespace_match_folder = false:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion

### Visual Studio ###

# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = warning

# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = none
59 changes: 59 additions & 0 deletions .github/workflows/github-actions-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Continuous Integration

on:
pull_request:
branches: [ "main" ]
push:
branches: [ "releases/**" ]

jobs:
build:
runs-on: ubuntu-latest

permissions:
checks: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Restore dependencies
run: dotnet restore PosInformatique.Foundations.slnx

- name: Build solution
run: |
dotnet build PosInformatique.Foundations.slnx \
--configuration Release \
--no-restore

- name: Run tests (.NET 8.0)
run: |
dotnet test PosInformatique.Foundations.slnx \
--configuration Release \
--no-build \
--logger "trx" \
--results-directory ./TestResults \
--collect "XPlat Code Coverage" \
--framework net8.0

- name: Run tests (.NET 9.0)
run: |
dotnet test PosInformatique.Foundations.slnx \
--configuration Release \
--no-build \
--logger "trx" \
--results-directory ./TestResults \
--collect "XPlat Code Coverage" \
--framework net9.0

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: (!cancelled())
with:
files: |
TestResults/**/*.trx
41 changes: 41 additions & 0 deletions .github/workflows/github-actions-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
workflow_dispatch:
inputs:
VersionPrefix:
type: string
description: The version of the library
required: true
default: 1.0.0
VersionSuffix:
type: string
description: The version suffix of the library (for example rc.1)

run-name: ${{ inputs.VersionSuffix && format('{0}-{1}', inputs.VersionPrefix, inputs.VersionSuffix) || inputs.VersionPrefix }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Build all the NuGet packages
run: |
dotnet pack PosInformatique.Foundations.slnx \
--configuration Release \
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }} \
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }} \
--output ./artifacts

- name: Publish the package to nuget.org
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--api-key "${{ secrets.NUGET_APIKEY }}" \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate
73 changes: 73 additions & 0 deletions CodeCoverage.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<!-- Data Collector for Visual Studio -->
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Configuration>
<CodeCoverage>

<!-- Match assembly file paths: -->
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*xunit.*</ModulePath>
<ModulePath>.*webjobs.*</ModulePath>
<ModulePath>bunit.*</ModulePath>
<ModulePath>fluentvalidation.*</ModulePath>
<ModulePath>moq.*</ModulePath>
<ModulePath>.*durabletask.*</ModulePath>
<ModulePath>microsoft.*</ModulePath>
<ModulePath>.*tests\.dll$</ModulePath>
</Exclude>
</ModulePaths>

<Attributes>
<Exclude>
<!-- Exclude generated code from code coverage -->
<Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute>
<Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute>
</Exclude>
</Attributes>

<Functions>
<Exclude>
<Function>^MimeKit\..*</Function>
</Exclude>
</Functions>

<Sources>
<Exclude>
<Source>.*\.razor</Source>
<Source>.*\.cshtml</Source>
</Exclude>
</Sources>

<!-- We recommend you do not change the following values: -->
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
<AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
<CollectFromChildProcesses>True</CollectFromChildProcesses>
<CollectAspDotNet>False</CollectAspDotNet>

</CodeCoverage>
</Configuration>
</DataCollector>

<!-- Data Collector for the CI build -->
<DataCollector friendlyName="XPlat Code Coverage">
<!-- Documentation: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md -->

<Configuration>
<Format>opencover,cobertura</Format>
<Exclude>[MimeKit.*]*</Exclude>
<ExcludeByAttribute>GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<ExcludeByFile>**/*.razor,**/*.razor.cs,**/*.cshtml</ExcludeByFile>
<IncludeTestAssembly>false</IncludeTestAssembly>
</Configuration>

</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
54 changes: 54 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Project>

<!-- Common properties -->
<PropertyGroup>
<Authors>Gilles TOURREAU</Authors>
<Company>P.O.S Informatique</Company>
<Product>P.O.S Informatique</Product>
<Copyright>Copyright (c) P.O.S Informatique. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/PosInformatique/PosInformatique.Foundations</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<!-- Enable the last version of C# -->
<LangVersion>latest</LangVersion>

<!-- Enable implict usings -->
<ImplicitUsings>enable</ImplicitUsings>

<!-- Disable the StyleCop 'XML comment analysis is disabled due to project configuration' warning. -->
<NoWarn>$(NoWarn);SA0001;NU1903</NoWarn>

<!-- Enforce .editorconfig style on build -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>

<!-- By default prefix all the assemblies name with ChantierConnect -->
<AssemblyName>PosInformatique.Foundations.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>PosInformatique.Foundations.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>

<!-- Common NuGet packages -->
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Add the default using directive for all the code -->
<ItemGroup>
<Using Include="System" />
<Using Include="System.Collections.ObjectModel" />
<Using Include="System.Threading.Tasks" />
</ItemGroup>

</Project>
34 changes: 34 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<!-- Versions of the packages -->
<DotNetVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.0</DotNetVersion>
<DotNetVersion Condition="'$(TargetFramework)' == 'net9.0'">9.0.0</DotNetVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Azure.Communication.Email" Version="1.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="FluentAssertions" Version="7.2.0" />
<PackageVersion Include="FluentValidation" Version="12.0.0" />
<PackageVersion Include="libphonenumber-csharp" Version="9.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Graph" Version="5.89.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="PosInformatique.FluentAssertions.Json" Version="1.6.0" />
<PackageVersion Include="PosInformatique.Moq.Analyzers" Version="2.0.1" />
<PackageVersion Include="Scriban" Version="6.5.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.15.0.120848" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="xunit.v3" Version="3.2.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
</ItemGroup>
</Project>
Binary file added Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading