Skip to content

Commit 6e56e9b

Browse files
committed
Centraliza propriedades e atualiza dependências
Centraliza propriedades comuns no arquivo `Directory.Build.props`, removendo redundâncias nos arquivos `.csproj`. Atualiza o framework- alvo para `.NET 9.0` e diversas dependências para versões mais recentes, incluindo pacotes do Entity Framework, NHibernate e MongoDB. Adiciona suporte ao algoritmo MD5 na classe `SecureHash` para compatibilidade com sistemas legados. Atualiza o arquivo de solução para o Visual Studio 2022 e inclui o projeto `Codout.Image.Extensions`. Remove propriedades obsoletas, padroniza metadados e ajusta referências de pacotes e projetos. Melhora a organização, segurança e compatibilidade do código, além de otimizar o processo de build.
1 parent ca2a721 commit 6e56e9b

20 files changed

Lines changed: 53 additions & 232 deletions

File tree

Codout.DynamicLinq/Codout.DynamicLinq.csproj

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<PackageIcon>logo-nuget.png</PackageIcon>
6-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
7-
<RepositoryType>git</RepositoryType>
8-
<PackageTags>Codout;Framework;DynamicLinq</PackageTags>
9-
<Authors>Clovis Coli Jr</Authors>
10-
<Company>Codout</Company>
114
<Description>Wrapper para datasource de lista paginada</Description>
12-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
13-
<Copyright>Codout</Copyright>
14-
<Version>5.0.6</Version>
15-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
16-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
5+
<PackageTags>Codout;Framework;DynamicLinq</PackageTags>
176
</PropertyGroup>
187

198
<ItemGroup>

Codout.Framework.Api.Client/Codout.Framework.Api.Client.csproj

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<PropertyGroup>
84
<Description>Biblioteca de funções para Cliente Api do Framework da Codout</Description>
9-
<Version>5.0.6</Version>
105
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
11-
<Authors>Clovis Coli Jr</Authors>
12-
<Copyright>Codout</Copyright>
13-
<PackageIconUrl></PackageIconUrl>
14-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
15-
<RepositoryType>git</RepositoryType>
16-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
176
<AssemblyVersion>3.0.6.0</AssemblyVersion>
187
<FileVersion>3.0.6.0</FileVersion>
19-
<Company>Codout</Company>
20-
<PackageIcon>logo-nuget.png</PackageIcon>
21-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
22-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
238
</PropertyGroup>
249

2510
<ItemGroup>

Codout.Framework.Api/Codout.Framework.Api.csproj

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<PropertyGroup>
84
<Description>Bliblioteca abstrata de implementação para Web API Restfull</Description>
9-
<Version>5.0.6</Version>
10-
<Authors>Clovis Coli Jr</Authors>
115
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
126
<Copyright>Codout</Copyright>
137
<PackageIconUrl></PackageIconUrl>
148
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
159
<RepositoryType>git</RepositoryType>
1610
<PackageTags>Codout</PackageTags>
17-
<Company>Codout</Company>
18-
<PackageIcon>logo-nuget.png</PackageIcon>
19-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
2011
<LangVersion>latest</LangVersion>
21-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
22-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
2312
</PropertyGroup>
2413

2514
<ItemGroup>

Codout.Framework.Application/Codout.Framework.Application.csproj

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<Version>5.0.6</Version>
6-
<Copyright>Codout</Copyright>
7-
<Authors>Clovis Coli Jr</Authors>
8-
<Company>Codout</Company>
94
<Description>Bliblioteca de implementação base da camada Application Service</Description>
10-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
11-
<PackageIcon>logo-nuget.png</PackageIcon>
12-
<PackageIconUrl />
13-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
14-
<RepositoryType>git</RepositoryType>
155
<PackageTags>Codout</PackageTags>
16-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
17-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
6+
<PackageIconUrl />
187
</PropertyGroup>
198

209
<ItemGroup>
2110
<PackageReference Include="AutoMapper" Version="15.0.1" />
22-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" />
11+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
2312
</ItemGroup>
2413

2514
<ItemGroup>

Codout.Framework.Common/Codout.Framework.Common.csproj

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<PropertyGroup>
84
<Description>Biblioteca de funcões comuns do Framework da Codout</Description>
9-
<Version>5.0.6</Version>
10-
<Authors>Clovis Coli Jr</Authors>
11-
<Copyright>Codout</Copyright>
12-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
13-
<RepositoryType>git</RepositoryType>
145
<PackageTags>Codout;Framework</PackageTags>
15-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
16-
<PackageIcon>logo-nuget.png</PackageIcon>
6+
<LangVersion>latest</LangVersion>
177
<AssemblyVersion></AssemblyVersion>
188
<FileVersion></FileVersion>
19-
<Company>Codout</Company>
20-
<LangVersion>latest</LangVersion>
21-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
22-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
239
</PropertyGroup>
2410

2511
<ItemGroup>
26-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.8" />
12+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
2713
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
2814
</ItemGroup>
2915

Codout.Framework.Common/Security/SimpleHash.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace Codout.Framework.Common.Security;
1515
/// </summary>
1616
public enum SecureHashAlgorithm
1717
{
18+
/// <summary>MD5 (insecure, legacy only)</summary>
19+
Md5,
1820
/// <summary>SHA-256 (recomendado para uso geral)</summary>
1921
Sha256,
2022
/// <summary>SHA-384 (segurança extra)</summary>
@@ -281,6 +283,7 @@ private static string ComputeHashInternal(string plainText,
281283
/// </summary>
282284
private static HashAlgorithm CreateHashAlgorithm(SecureHashAlgorithm algorithm) => algorithm switch
283285
{
286+
SecureHashAlgorithm.Md5 => MD5.Create(), // ⚠️ MD5 is insecure, use only for legacy compatibility
284287
SecureHashAlgorithm.Sha256 => SHA256.Create(),
285288
SecureHashAlgorithm.Sha384 => SHA384.Create(),
286289
SecureHashAlgorithm.Sha512 => SHA512.Create(),
@@ -295,6 +298,7 @@ private static string ComputeHashInternal(string plainText,
295298
/// </summary>
296299
private static int GetHashSize(SecureHashAlgorithm algorithm) => algorithm switch
297300
{
301+
SecureHashAlgorithm.Md5 => 16, // 128 bits
298302
SecureHashAlgorithm.Sha256 or SecureHashAlgorithm.Sha3_256 => 32,
299303
SecureHashAlgorithm.Sha384 or SecureHashAlgorithm.Sha3_384 => 48,
300304
SecureHashAlgorithm.Sha512 or SecureHashAlgorithm.Sha3_512 => 64,

Codout.Framework.DAL/Codout.Framework.DAL.csproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
54
<LangVersion>latest</LangVersion>
6-
</PropertyGroup>
7-
8-
<PropertyGroup>
95
<Description>Interface da Biblioteca de persistência do Framework da Codout</Description>
10-
<Version>5.0.6</Version>
11-
<Authors>Clovis Coli Jr</Authors>
12-
<Company>Codout</Company>
13-
<Copyright>Codout</Copyright>
14-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
15-
<RepositoryType>git</RepositoryType>
166
<PackageTags>Codout;Framework;ORM;DAL</PackageTags>
17-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
18-
<PackageIcon>logo-nuget.png</PackageIcon>
19-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
20-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
217
</PropertyGroup>
228

239
<ItemGroup>

Codout.Framework.Domain/Codout.Framework.Domain.csproj

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<PropertyGroup>
84
<Description>Camada de Domínio do Framework da Codout</Description>
9-
<Version>5.0.6</Version>
10-
<Authors>Clovis Coli Jr</Authors>
11-
<Company>Codout</Company>
12-
<Copyright>Codout</Copyright>
13-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
14-
<PackageIconUrl></PackageIconUrl>
15-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
16-
<RepositoryType>git</RepositoryType>
175
<PackageTags>Codout;Framework;Domain;</PackageTags>
18-
<PackageIcon>logo-nuget.png</PackageIcon>
19-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
20-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
216
</PropertyGroup>
227

238
<ItemGroup>
Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<PropertyGroup>
84
<Description>Implementação da interface Codout.Framework.DAL para EntityFrameworkCore</Description>
9-
<Version>5.0.6</Version>
10-
<Authors>Clovis Coli Jr</Authors>
11-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
12-
<RepositoryType>git</RepositoryType>
135
<PackageTags>Codout;Framework;ORM;DAL;EnityFrameworkCore;</PackageTags>
14-
<Copyright>Codout</Copyright>
15-
<Company>Codout</Company>
16-
<PackageIcon>logo-nuget.png</PackageIcon>
176
<PackageReleaseNotes>Inclusão do método Refresh() em EFRepository</PackageReleaseNotes>
187
<LangVersion>latest</LangVersion>
19-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
20-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
218
</PropertyGroup>
229

2310
<ItemGroup>
@@ -33,10 +20,10 @@
3320

3421
<ItemGroup>
3522
<PackageReference Include="EntityFramework" Version="6.5.1" />
36-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.8" />
37-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.8" />
38-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" />
39-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" />
23+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.9" />
24+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.9" />
25+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.9" />
26+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
4027
</ItemGroup>
4128

4229
</Project>
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
54
<LangVersion>latest</LangVersion>
6-
</PropertyGroup>
7-
8-
<PropertyGroup>
95
<Description>Implementação da interface Codout.Framework.DAL para MongoDB</Description>
10-
<Version>5.0.6</Version>
11-
<Authors>Clovis Coli Jr</Authors>
12-
<Company>Codout</Company>
13-
<Copyright>Codout</Copyright>
14-
<RepositoryUrl>https://github.com/Codout/Codout.Framework</RepositoryUrl>
15-
<RepositoryType>git</RepositoryType>
166
<PackageTags>Codout;Framework;ORM;DAL;MongoDB;</PackageTags>
17-
<PackageProjectUrl>https://github.com/Codout/Codout.Framework</PackageProjectUrl>
18-
<PackageIcon>logo-nuget.png</PackageIcon>
19-
<PackageOutputPath>$(SolutionDir)Packages</PackageOutputPath>
20-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
217
</PropertyGroup>
228

239
<ItemGroup>
@@ -32,9 +18,9 @@
3218
</ItemGroup>
3319

3420
<ItemGroup>
35-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.8" />
36-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" />
37-
<PackageReference Include="MongoDB.Driver" Version="3.4.3" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.9" />
22+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
23+
<PackageReference Include="MongoDB.Driver" Version="3.5.0" />
3824
</ItemGroup>
3925

4026
</Project>

0 commit comments

Comments
 (0)