Skip to content

Commit 858cfdb

Browse files
Merge pull request #170 from Genocs/develop
Develop
2 parents 576e681 + f65fa82 commit 858cfdb

File tree

65 files changed

+459
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+459
-311
lines changed

Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Version>7.1.0</Version>
1717
<LangVersion>13.0</LangVersion>
1818
<Company>Genocs</Company>
19-
<Copyright>Genocs 2024</Copyright>
19+
<Copyright>Genocs 2025</Copyright>
2020
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2121
<PackageProjectUrl>https://github.com/Genocs/genocs-library</PackageProjectUrl>
2222
<RepositoryUrl>https://github.com/Genocs/genocs-library.git</RepositoryUrl>
@@ -26,7 +26,8 @@
2626
</PropertyGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Roslynator.Analyzers" Version="4.13.1">
29+
30+
<PackageReference Include="Roslynator.Analyzers" Version="4.14.0">
3031
<PrivateAssets>all</PrivateAssets>
3132
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3233
</PackageReference>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Genocs Services
3+
Copyright (c) 2025 Genocs Services
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/Genocs.Auth/Extensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private static IGenocsBuilder AddJwt(this IGenocsBuilder builder, JwtOptions opt
186186
/// </summary>
187187
/// <param name="builder">The Genocs builder.</param>
188188
/// <param name="sectionName">The configuration section name.</param>
189-
/// <returns>The Genocs builder you can use for chain.</returns>
189+
/// <returns>The Genocs builder. You can use it for chain commands.</returns>
190190
public static IGenocsBuilder AddOpenIdJwt(this IGenocsBuilder builder, string sectionName = JwtOptions.Position)
191191
{
192192
if (string.IsNullOrWhiteSpace(sectionName))
@@ -223,7 +223,7 @@ public static IGenocsBuilder AddOpenIdJwt(this IGenocsBuilder builder, string se
223223
/// </summary>
224224
/// <param name="builder">The Genocs builder.</param>
225225
/// <param name="sectionName">The optional section name. Default name: 'jwt'.</param>
226-
/// <returns>The Genocs builder you can use for chaining.</returns>
226+
/// <returns>The Genocs builder. You can use it for chain commands.</returns>
227227
/// <exception cref="InvalidOperationException">Whenever mandatory data like 'IssuerSigningKey' is missing.</exception>
228228
public static IGenocsBuilder AddPrivateKeyJwt(this IGenocsBuilder builder, string sectionName = JwtOptions.Position)
229229
{
@@ -269,7 +269,7 @@ public static IGenocsBuilder AddPrivateKeyJwt(this IGenocsBuilder builder, strin
269269
/// This middleware validates the access token in real-time.
270270
/// </summary>
271271
/// <param name="app">The app builder.</param>
272-
/// <returns>The app builder you can use for chaining.</returns>
272+
/// <returns>The app builder. You can use it for chain commands.</returns>
273273
public static IApplicationBuilder UseAccessTokenValidator(this IApplicationBuilder app)
274274
=> app.UseMiddleware<AccessTokenValidatorMiddleware>();
275275
}

src/Genocs.Auth/Genocs.Auth.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
32-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="9.0.4" />
32+
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="9.0.8" />
3333
</ItemGroup>
3434

3535
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">

src/Genocs.Common/README_NUGET.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,37 @@ Please check the [GitHub repository](https://github.com/Genocs/genocs-library) t
1818
The change log and breaking changes are listed here.
1919

2020
- [releases](https://github.com/Genocs/genocs-library/releases)
21+
22+
23+
# The Genocs Library - Common components
24+
25+
Genocs Enterprise Library - Genocs.Common. This package contains a set of common types used across the framework.
26+
The library is built to be used with NET6, NET7 NET8 and NET9.
27+
28+
## Description
29+
30+
Common NuGet package contains common types with no other dependencies.
31+
32+
33+
## Dependencies
34+
- **NONE**
35+
36+
### Framework references
37+
- **NONE**
38+
39+
## Support
40+
41+
Please check the [GitHub repository](https://github.com/Genocs/genocs-library) to get more info.
42+
43+
## Documentation
44+
45+
The documentation is available at [Genocs - Open-Source Framework for Enterprise Applications](https://genocs-blog.netlify.app/).
46+
47+
48+
## Release notes
49+
50+
The change log and breaking changes are listed here.
51+
52+
- [CHANGELOG](https://github.com/Genocs/genocs-library/blob/main/CHANGELOG.md)
53+
54+
- [releases](https://github.com/Genocs/genocs-library/releases)

src/Genocs.Common/Types/IInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Genocs.Common.Types;
22

33
/// <summary>
4-
/// Initializer interface definition.
4+
/// The Genocs Initializer interface definition.
55
/// </summary>
66
public interface IInitializer
77
{
Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
using Genocs.Core.Domain.Repositories;
2-
using MongoDB.Bson;
32

43
namespace Genocs.Core.Demo.Domain.Aggregates;
54

65
[TableMapping("Orders")]
7-
public class Order : BaseAggregate
6+
public class Order(string orderId, string userId, decimal amount, string currency) : BaseAggregate
87
{
9-
public Order(string orderId, string userId, decimal amount, string currency)
10-
{
11-
OrderId = orderId;
12-
UserId = userId;
13-
Amount = amount;
14-
Currency = currency;
15-
}
16-
17-
public string OrderId { get; set; } = ObjectId.GenerateNewId().ToString();
18-
public string UserId { get; set; } = default!;
19-
public decimal Amount { get; set; }
20-
public string Currency { get; set; } = default!;
8+
public string OrderId { get; set; } = orderId;
9+
public string UserId { get; set; } = userId;
10+
public decimal Amount { get; set; } = amount;
11+
public string Currency { get; set; } = currency;
2112
}

src/Genocs.Core.Demo.Domain/Aggregates/User.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,10 @@
33
namespace Genocs.Core.Demo.Domain.Aggregates;
44

55
[TableMapping("Users")]
6-
public class User : BaseAggregate
6+
public class User(string userId, string username, decimal age, string country) : BaseAggregate
77
{
8-
public string UserId { get; set; } = default!;
9-
public string Username { get; set; } = default!;
10-
public decimal Age { get; set; }
11-
public string Country { get; set; } = default!;
12-
13-
public User(string userId, string username, decimal age, string country)
14-
{
15-
UserId = userId;
16-
Username = username;
17-
Age = age;
18-
Country = country;
19-
}
8+
public string UserId { get; set; } = userId;
9+
public string Username { get; set; } = username;
10+
public decimal Age { get; set; } = age;
11+
public string Country { get; set; } = country;
2012
}

src/Genocs.Core.Demo.HelloWorld/Genocs.Core.Demo.HelloWorld.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
11+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.8" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

src/Genocs.Core.Demo.Infrastructure/Genocs.Core.Demo.Infrastructure.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.4" />
11-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.1" />
10+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" />
11+
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.1" />
1212
</ItemGroup>
1313

1414
</Project>

0 commit comments

Comments
 (0)