Files
DigitalData.MessagingService/src/presentation/DigitalData.MessagingService.Client/OnReconnect.cs
TekH 7773c8aa7f Update OnReconnect docs and README examples
Updated XML documentation in `OnReconnect.cs` to reference the updated `EmailSender.ConnectRabbitMq` method signature, clarifying its behavior when a connection is already established.

Revised `README.md` examples to replace `OutgoingEmailEvent` with `Email` and removed `Id` and `QueuedAt` properties, as they are now set internally. Added a note to clarify required fields for the `Email` object.

Added a new section to the `README.md` demonstrating how to check the connection status using `EmailSender.IsConnected`.
2026-07-29 14:36:47 +02:00

20 lines
656 B
C#

namespace DigitalData.MessagingService.Client;
/// <summary>
/// Defines the behavior when <see cref="EmailSender.ConnectRabbitMq(Action{RabbitMQ.RabbitMqConfiguration}, OnReconnect)"/> is called
/// while a connection has already been established.
/// </summary>
public enum OnReconnect
{
/// <summary>
/// Throws an <see cref="System.InvalidOperationException"/> if the messaging service
/// is already connected. This is the default behavior.
/// </summary>
ThrowException,
/// <summary>
/// Silently ignores the reconnection attempt if the messaging service
/// is already connected.
/// </summary>
Ignore
}