-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from atidev/BILL-135098
Add nullable annotation, file scoped and access modifier was fixed
- Loading branch information
Showing
13 changed files
with
201 additions
and
198 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,21 +1,20 @@ | ||
using System; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
public class EventbusOptions | ||
{ | ||
public class EventbusOptions | ||
{ | ||
public string ServiceName { get; set; } | ||
public string ConnectionString { get; set; } | ||
public string Environment { get; set; } | ||
public TimeSpan RabbitConnectInterval { get; set; } = TimeSpan.FromSeconds(5); | ||
public bool Enabled { get; set; } | ||
public string ErrorQueueName { get; set; } | ||
public required string ServiceName { get; init; } | ||
public required string ConnectionString { get; init; } | ||
public required string Environment { get; init; } | ||
public required TimeSpan RabbitConnectInterval { get; set; } = TimeSpan.FromSeconds(5); | ||
public required bool Enabled { get; init; } | ||
public string? ErrorQueueName { get; init; } | ||
|
||
#region ForLocalTesting | ||
#region ForLocalTesting | ||
|
||
public bool AddHostnamePostfixToQueues { get; set; } | ||
public bool DeleteQueuesOnApplicationShutdown { get; set; } | ||
public bool AddHostnamePostfixToQueues { get; init; } | ||
public bool DeleteQueuesOnApplicationShutdown { get; init; } | ||
|
||
#endregion | ||
} | ||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
namespace ATI.Services.RabbitMQ | ||
// ReSharper disable PropertyCanBeMadeInitOnly.Global | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
public class ExchangeInfo | ||
{ | ||
public class ExchangeInfo | ||
{ | ||
public string Name { get; set; } | ||
public string Type { get; set; } | ||
} | ||
} | ||
public required string Name { get; set; } | ||
public required string Type { get; set; } | ||
} |
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,10 +1,9 @@ | ||
using JetBrains.Annotations; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
[PublicAPI] | ||
public interface IEventbusEntity | ||
{ | ||
[PublicAPI] | ||
public interface IEventbusEntity | ||
{ | ||
string GetRoutingKey(string action); | ||
} | ||
} | ||
string GetRoutingKey(string action); | ||
} |
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,15 +1,14 @@ | ||
using JetBrains.Annotations; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
[PublicAPI] | ||
public static class Operation | ||
{ | ||
[PublicAPI] | ||
public static class Operation | ||
{ | ||
public const string Change = "changed"; | ||
public const string Update = "u"; | ||
public const string Insert = "i"; | ||
public const string Delete = "d"; | ||
public const string BeforeUpdate = "beforeUpdate"; | ||
public const string Any = "*"; | ||
} | ||
} | ||
public const string Change = "changed"; | ||
public const string Update = "u"; | ||
public const string Insert = "i"; | ||
public const string Delete = "d"; | ||
public const string BeforeUpdate = "beforeUpdate"; | ||
public const string Any = "*"; | ||
} |
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using EasyNetQ; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
public class RabbitMqConventions : Conventions | ||
{ | ||
public class RabbitMqConventions : Conventions | ||
public RabbitMqConventions(ITypeNameSerializer typeNameSerializer, EventbusOptions options) : | ||
base(typeNameSerializer) | ||
{ | ||
public RabbitMqConventions(ITypeNameSerializer typeNameSerializer, EventbusOptions options) : | ||
base(typeNameSerializer) | ||
{ | ||
ErrorExchangeNamingConvention = _ => "Services_Default_Error_Exchange"; | ||
ErrorQueueNamingConvention = _ => !string.IsNullOrEmpty(options.ErrorQueueName) | ||
? options.ErrorQueueName | ||
: "Services_Default_Error_Queue"; | ||
} | ||
ErrorExchangeNamingConvention = _ => "Services_Default_Error_Exchange"; | ||
ErrorQueueNamingConvention = _ => !string.IsNullOrEmpty(options.ErrorQueueName) | ||
? options.ErrorQueueName | ||
: "Services_Default_Error_Queue"; | ||
} | ||
} |
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,10 +1,9 @@ | ||
using System.Collections.Generic; | ||
using EasyNetQ.Topology; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
public static class RabbitMqDeclaredQueues | ||
{ | ||
public static class RabbitMqDeclaredQueues | ||
{ | ||
public static List<Queue> DeclaredQueues { get; } = new(); | ||
} | ||
public static List<Queue> DeclaredQueues { get; } = []; | ||
} |
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
using JetBrains.Annotations; | ||
|
||
namespace ATI.Services.RabbitMQ | ||
namespace ATI.Services.RabbitMQ; | ||
|
||
[PublicAPI] | ||
public static class RoutingKeys | ||
{ | ||
[PublicAPI] | ||
public static class RoutingKeys | ||
{ | ||
public const string Created = "created"; | ||
public const string Inserted = "inserted"; | ||
public const string Updated = "updated"; | ||
public const string Deleted = "deleted"; | ||
public const string Restored = "restored"; | ||
} | ||
public const string Created = "created"; | ||
public const string Inserted = "inserted"; | ||
public const string Updated = "updated"; | ||
public const string Deleted = "deleted"; | ||
public const string Restored = "restored"; | ||
} |
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