documents
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
namespace Polonium.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for global registry implementations that manage application-wide state and lifecycle.
|
||||
/// </summary>
|
||||
public interface IGlobalRegistry
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the registry is in a paused state.
|
||||
/// </summary>
|
||||
public bool Paused { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starts the registry and begins processing.
|
||||
/// </summary>
|
||||
public void Start();
|
||||
|
||||
/// <summary>
|
||||
/// Prepares the registry for operation, initializing necessary resources.
|
||||
/// </summary>
|
||||
public void Prepare();
|
||||
}
|
||||
@@ -3,13 +3,36 @@ using Polonium.MessageManager;
|
||||
|
||||
namespace Polonium.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for message clients that can send and receive messages through the message bus.
|
||||
/// </summary>
|
||||
public interface IMessageClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the post code used for message routing.
|
||||
/// </summary>
|
||||
string PostCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Receives a message from the message bus.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to receive.</param>
|
||||
void ReceiveMessage(PoloniumMessage msg);
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for message sent events.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message that was sent.</param>
|
||||
delegate void MessageSentEventHandler(PoloniumMessage msg);
|
||||
|
||||
/// <summary>
|
||||
/// Event raised when a message is sent by this client.
|
||||
/// </summary>
|
||||
event MessageSentEventHandler MessageSent;
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message through the message bus.
|
||||
/// </summary>
|
||||
/// <param name="msg">The message to send.</param>
|
||||
public void SendMessage(PoloniumMessage msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user