Files
CBDDC/src/ZB.MOM.WW.CBDDC.Core/Network/IPeerNodeConfigurationProvider.cs
Joseph Doherty 7ebc2cb567
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
Reformat/cleanup
2026-02-21 07:53:53 -05:00

40 lines
1.8 KiB
C#
Executable File

using System.Threading.Tasks;
namespace ZB.MOM.WW.CBDDC.Core.Network;
/// <summary>
/// Represents a method that handles peer node configuration change notifications.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="newConfig">The updated peer node configuration.</param>
public delegate void PeerNodeConfigurationChangedEventHandler(object? sender, PeerNodeConfiguration newConfig);
/// <summary>
/// Defines a contract for retrieving and monitoring configuration settings for a peer node.
/// </summary>
/// <remarks>
/// Implementations of this interface provide access to the current configuration and notify subscribers
/// when configuration changes occur. This interface is typically used by components that require up-to-date
/// configuration information for peer-to-peer networking scenarios.
/// </remarks>
public interface IPeerNodeConfigurationProvider
{
/// <summary>
/// Asynchronously retrieves the current configuration settings for the peer node.
/// </summary>
/// <returns>
/// A task that represents the asynchronous operation. The task result contains the current
/// <see cref="PeerNodeConfiguration" />.
/// </returns>
public Task<PeerNodeConfiguration> GetConfiguration();
/// <summary>
/// Occurs when the configuration of the peer node changes.
/// </summary>
/// <remarks>
/// Subscribe to this event to be notified when any configuration settings for the peer node are
/// modified. Event handlers can use this notification to update dependent components or respond to configuration
/// changes as needed.
/// </remarks>
public event PeerNodeConfigurationChangedEventHandler? ConfigurationChanged;
}