-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
422 additions
and
817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
console/YANLib.Benchmarks/Process/Library/JsonDeserializeBenchmark.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,8 @@ | |
} | ||
#endif | ||
|
||
#if DEBUG | ||
using static System.Console; | ||
|
||
_ = ReadLine(); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
host/YANLib.HttpApi.Host/EntityFrameworkCore/YANLibHttpApiHostMigrationsDbContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
host/YANLib.HttpApi.Host/EntityFrameworkCore/YANLibHttpApiHostMigrationsDbContextFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
host/YANLib.HttpApi.Host/Middlewares/UnauthorizedHandlerMiddleware.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/YANLib.Application.Redis/Redis/ConnectionFactory/IRedisConnectionFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
src/YANLib.Application.Redis/Redis/ConnectionFactory/Implements/RedisConnectionFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
namespace YANLib.Application.Redis.ConnectionFactory.Implements; | ||
using Microsoft.Extensions.Options; | ||
using StackExchange.Redis; | ||
using Volo.Abp.DependencyInjection; | ||
using static StackExchange.Redis.ConnectionMultiplexer; | ||
|
||
namespace YANLib.Application.Redis.ConnectionFactory.Implements; | ||
|
||
public class RedisConnectionFactory : IRedisConnectionFactory, ISingletonDependency | ||
{ | ||
#region Fields | ||
private readonly RedisOptions _option; | ||
private readonly Lazy<ConnectionMultiplexer> _connection; | ||
#endregion | ||
|
||
#region Constructors | ||
public RedisConnectionFactory(IOptions<RedisOptions> options) | ||
{ | ||
_option = options.Value; | ||
_connection = new Lazy<ConnectionMultiplexer>(() => Connect(_option.RedisConnectionString ?? string.Empty)); | ||
} | ||
#endregion | ||
|
||
#region Implements | ||
public ConnectionMultiplexer Connection() => _connection.Value; | ||
|
||
public string ConnectionString() => (_option.RedisConnectionString ?? ",").Split(',')[0]; | ||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
src/YANLib.Application/Handlers/AdjustCertificateHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
namespace YANLib.Handlers; | ||
using Microsoft.Extensions.Logging; | ||
using System.Threading.Tasks; | ||
using Volo.Abp.EventBus.Distributed; | ||
using YANLib.Core; | ||
using YANLib.RabbitMq.Etos; | ||
using YANLib.Requests; | ||
using YANLib.Services; | ||
|
||
namespace YANLib.Handlers; | ||
|
||
public class AdjustCertificateHandler( | ||
ILogger<AdjustCertificateHandler> logger, | ||
ICertificateService certificateService | ||
) : YANLibAppService, IDistributedEventHandler<CertificateAdjustEto> | ||
{ | ||
#region Fields | ||
private readonly ILogger<AdjustCertificateHandler> _logger = logger; | ||
private readonly ICertificateService _certificateService = certificateService; | ||
#endregion | ||
|
||
#region Implements | ||
public async Task HandleEventAsync(CertificateAdjustEto eventData) | ||
{ | ||
_logger.LogInformation("AdjustCertificateHandler-Subscribe: {EventData}", eventData.Serialize()); | ||
_logger.LogInformation("AdjustCertificateHandler-UpdateCertificateService: {Responses}", await _certificateService.Update(ObjectMapper.Map<CertificateAdjustEto, CertificateRequest>(eventData))); | ||
} | ||
#endregion | ||
} |
Oops, something went wrong.