documents

This commit is contained in:
h z
2025-07-15 00:15:56 +01:00
parent c3b57d84a6
commit 6640b9613f
11 changed files with 290 additions and 10 deletions

View File

@@ -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();
}

View File

@@ -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);
}